Bug 190349 - archivers/unzip and archivers/unzip-iconv conflict
Summary: archivers/unzip and archivers/unzip-iconv conflict
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-28 18:30 UTC by mikhail.rokhin
Modified: 2014-08-15 18:14 UTC (History)
3 users (show)

See Also:


Attachments
Combine all 4 unzip slave ports, convert to options (35.26 KB, patch)
2014-08-14 19:26 UTC, John Marino
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mikhail.rokhin 2014-05-28 18:30:00 UTC
unzip-iconv is installed and preferred, but installing gnome2 next leads to conflict.

'pkg set -o unzip:unzip-iconv' doesn't help, probably because of next time 'pkg install gnome2' runs it updates origins backward to unzip.

Is it possible to change deps from unzip/unrar to their -iconv analogues, since FreeBSD is developed for multilingual purposes?

Thank you.

How-To-Repeat: install unzip-iconv and then gnome2
Comment 1 John Marino freebsd_committer 2014-07-14 11:39:58 UTC
yes, they conflict.  The conflict is noted in the makefile, so it's known.  Basically unzip-iconv is a slave port that builds iconv with WITH_ICONV defined.  The whole thing is probably a bad idea.

My recommendation is build unzip from source like this:

> cd /usr/ports/archivers/unzip
> make WITH_ICONV=yes ; make install

The idea is you don't even mess with the ill conceived archivers/unzip_iconv port.  This should have been an option for unzip all along.

(The reason it's a bad idea is because unzip is used as an archiver for ports itself so really unzip_iconv can NEVER been installed practically)
Comment 2 John Marino freebsd_committer 2014-07-20 15:31:54 UTC
bapt, should we merge unzip-iconv into unzip and add iconv as an option?
Comment 3 mikhail.rokhin 2014-07-22 16:14:14 UTC
Could you be so kind and do it?

(In reply to John Marino from comment #2)
> bapt, should we merge unzip-iconv into unzip and add iconv as an option?
Comment 4 John Marino freebsd_committer 2014-08-11 11:03:46 UTC
okay, I'll try.
Comment 5 John Marino freebsd_committer 2014-08-14 15:37:16 UTC
Somehow we got this far without ever talking to the port maintainer, ehaupt@

not only does archivers/unzip-iconv have be merged and remove, but for the same reasons we have to merge in russian/unzip, chinese/unzip and korean/unzip.  They are just as practically impossible to use as unzip-iconv is.
Comment 6 John Marino freebsd_committer 2014-08-14 17:15:08 UTC
As I dig into this port, I see a lot of things that could use improving so this is going to turn out to be an overhaul.

While digging, I see this:
WITH_UNZIP_UNREDUCE

It was last referenced in 2004.  I suspect this is something that could be eliminated to simplify the port.  I don't know if it even works still.

ehaupt, do you have any background on this?
Comment 7 John Marino freebsd_committer 2014-08-14 17:33:07 UTC
Another concepts question: Obviously korean, russian, and chinese options should be mutually exclusive, but what about iconv?   Can you have russian + iconv options together?
Comment 8 John Marino freebsd_committer 2014-08-14 19:20:11 UTC
I finished the draft and verified iconv builds easily with russian, chinese, and korea options.

So I've got:
[ ] docs 
[ ] iconv
[ 0 or 1 ] russian, chinese, korean

I'll upload the diff in a minute.
The four slave ports would have to be removed at the same time
Comment 9 John Marino freebsd_committer 2014-08-14 19:26:34 UTC
Created attachment 145789 [details]
Combine all 4 unzip slave ports, convert to options
Comment 10 John Marino freebsd_committer 2014-08-14 19:27:20 UTC
FYI, I removed WITH_UNZIP_UNREDUCE since it wasn't touched since 2004 and unzip went through a few revisions since then.
Comment 11 John Marino freebsd_committer 2014-08-14 19:30:26 UTC
Mikhail, it would be good if you could provide feedback if this patch works well for  you.
Comment 12 John Marino freebsd_committer 2014-08-15 09:42:05 UTC
ehaupt approved on IRC
Comment 13 commit-hook freebsd_committer 2014-08-15 10:11:50 UTC
A commit references this bug:

Author: marino
Date: Fri Aug 15 10:11:14 UTC 2014
New revision: 364956
URL: http://svnweb.freebsd.org/changeset/ports/364956

Log:
  Merge 4 unzip slave ports into archivers/unzip as non-default options

  It is practically impossible to use any of the unzip slave ports.  This
  is because archivers/unzip is used by the ports infrastruction (via
  USES=zip, USES=zip:infozip) and each slave port conflicts with it.
  If you install the slave port first, then the port infrastructure can't
  install archivers/unzip (although if attempted, the extracts dependency
  might be satisfied by the slave port so it might actually work).

  In any case, this change:
    * Adds "iconv" support as an non-default option
    * Add a localization group that can have zero or one selection
    * That group contains Chinese, Korean, or Russian support
    * WITH_UNZIP_UNREDUCE support was removed (I'm not sure it even worked)
    * Makefile was simplified (several loops removed)
    * Removes unzip-iconv, Chinese, Korean, Russian slave ports

  PR:		190349
  Reported by:	Mikhail Rokhin
  Unzip overhaul:	marino
  Approved by:	maintainer (ehaupt@)

Changes:
  head/MOVED
  head/archivers/unzip/Makefile
  head/archivers/unzip/distinfo
  head/archivers/unzip/files/extra-iconv-patch-unix_unix.c
  head/archivers/unzip/files/extra-iconv-patch-unix_unxcfg.h
  head/archivers/unzip/files/extra-iconv-patch-unzip.c
  head/archivers/unzip/files/extra-iconv-patch-unzpriv.h
  head/archivers/unzip/files/extra-iconv-patch-zipinfo.c
  head/archivers/unzip/files/extra-ko-patch-fileio.c
  head/archivers/unzip/files/extra-ko-patch-unzip.c
  head/archivers/unzip/files/extra-ko-patch-unzip.h
  head/archivers/unzip/files/extra-ru-patch-ebcdic.h
  head/archivers/unzip/files/extra-zh-patch-fileio.c
  head/archivers/unzip/files/patch-aa
  head/archivers/unzip/files/patch-ab
  head/archivers/unzip/files/patch-consts.h
  head/archivers/unzip/files/patch-contsts.h
  head/archivers/unzip/files/patch-process.c
  head/archivers/unzip/files/patch-unix_Makefile
  head/archivers/unzip/files/patch-unix_unix.c
  head/archivers/unzip-iconv/
  head/chinese/unzip/
  head/korean/unzip/
  head/russian/unzip/
Comment 14 John Marino freebsd_committer 2014-08-15 10:15:17 UTC
I'm glad to see this one finished. :)
Comment 15 mikhail.rokhin 2014-08-15 18:14:16 UTC
Thank you very much)

(In reply to commit-hook from comment #13)
> A commit references this bug:
> 
> Author: marino
> Date: Fri Aug 15 10:11:14 UTC 2014
> New revision: 364956
> URL: http://svnweb.freebsd.org/changeset/ports/364956
> 
> Log:
>   Merge 4 unzip slave ports into archivers/unzip as non-default options
> 
>   It is practically impossible to use any of the unzip slave ports.  This
>   is because archivers/unzip is used by the ports infrastruction (via
>   USES=zip, USES=zip:infozip) and each slave port conflicts with it.
>   If you install the slave port first, then the port infrastructure can't
>   install archivers/unzip (although if attempted, the extracts dependency
>   might be satisfied by the slave port so it might actually work).
> 
>   In any case, this change:
>     * Adds "iconv" support as an non-default option
>     * Add a localization group that can have zero or one selection
>     * That group contains Chinese, Korean, or Russian support
>     * WITH_UNZIP_UNREDUCE support was removed (I'm not sure it even worked)
>     * Makefile was simplified (several loops removed)
>     * Removes unzip-iconv, Chinese, Korean, Russian slave ports
> 
>   PR:		190349
>   Reported by:	Mikhail Rokhin
>   Unzip overhaul:	marino
>   Approved by:	maintainer (ehaupt@)
> 
> Changes:
>   head/MOVED
>   head/archivers/unzip/Makefile
>   head/archivers/unzip/distinfo
>   head/archivers/unzip/files/extra-iconv-patch-unix_unix.c
>   head/archivers/unzip/files/extra-iconv-patch-unix_unxcfg.h
>   head/archivers/unzip/files/extra-iconv-patch-unzip.c
>   head/archivers/unzip/files/extra-iconv-patch-unzpriv.h
>   head/archivers/unzip/files/extra-iconv-patch-zipinfo.c
>   head/archivers/unzip/files/extra-ko-patch-fileio.c
>   head/archivers/unzip/files/extra-ko-patch-unzip.c
>   head/archivers/unzip/files/extra-ko-patch-unzip.h
>   head/archivers/unzip/files/extra-ru-patch-ebcdic.h
>   head/archivers/unzip/files/extra-zh-patch-fileio.c
>   head/archivers/unzip/files/patch-aa
>   head/archivers/unzip/files/patch-ab
>   head/archivers/unzip/files/patch-consts.h
>   head/archivers/unzip/files/patch-contsts.h
>   head/archivers/unzip/files/patch-process.c
>   head/archivers/unzip/files/patch-unix_Makefile
>   head/archivers/unzip/files/patch-unix_unix.c
>   head/archivers/unzip-iconv/
>   head/chinese/unzip/
>   head/korean/unzip/
>   head/russian/unzip/