Bug 434856 - Please add a flag to filter OSX stuff
Summary: Please add a flag to filter OSX stuff
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: unzip
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Ivana Varekova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F9Target 434850
TreeView+ depends on / blocked
 
Reported: 2008-02-25 20:58 UTC by Nicolas Mailhot
Modified: 2008-02-27 08:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-27 08:22:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nicolas Mailhot 2008-02-25 20:58:39 UTC
OS X created zip files
(for example http://www.greekfontsociety.gr/GFS_NEOHELLENIC_OT.zip) include
Apple-specific metadata in an __MACOSX/ directory. This causes problems for
scripts that do not expect this top-level directory under Linux.

Unfortunately, filtering out unconditionally this directory with -x is not
working nicely either as unzip will complain if you ask it to filter out a
non-existing file.

Thus simple scripts that invoked plain unzip now need to test if this directory
is present in an archive, and if yes use -x and if no do normal unzip.

This is getting very user-unfriendly.

Please add a flag to unzip that enables stripping of all OSX specific metadata
no other OS uses when unzipping a file (and is a nooop if this metadata is not
present, ie unzipo succeeds in all cases)

See also
http://www.info-zip.org/board/board.pl?m-1203972942/

and bug #434850

Comment 1 Panu Matilainen 2008-02-26 07:59:59 UTC
I think it'd be better if unzip *defaulted* to not extracting the Apple-metadata
when running on non-OSX system where the data is totally useless for 99.99%
users. For the 0.01% that care, add a new flag to request extracting the
OSX-metadata instead.

Comment 2 Ivana Varekova 2008-02-27 08:22:54 UTC
The archive you use as an example contains files in GFS_NEOHELLENIC_OT and in
__MACOSX directory so both of them are unpacked by unzip command.
There is no difference between these files for unzip (the only difference is the
directory name). unzip command should not do any automatic censorship in the
archive files and this seems for me to be too specialize case to have a separate
option for it. 
Situation should be fixed on the zip side which create this archive and which
attach unwanted __MACOSX zip files here. 
Option -x should be used with file name not with directory name so there should
be used option -x __MACOSX/* to eliminate __MACOSX directory.


Note You need to log in before you can comment on or make changes to this bug.