Mail Archives: cygwin/2001/09/04/15:52:13
On Tue, Sep 04, 2001 at 10:52:21AM -0600, Warren Young wrote:
>Christopher Faylor wrote:
>>
>> >Somebody else mentioned this earlier -- and explained that Debian did
>> >exactly that. ".deb" files are just ar archives, but .deb implies that
>> >they obey some sort of internal format standard ("CYGWIN-PATCHES" ?
>> >/etc/postinstall? )
>> >
>> >I actually think this is a pretty good idea.
>>
>> It does have merits except for the fact that you lose the ability to
>> distinguish between a .gz and .bz2 compressed archive.
>
>A quick peek at /etc/magic tells me that it's simple to distinguish the
>two, and in fact it's more reliable, since magic numbers don't lie, but
>file names can. Also, we might say from the outset that Cygwin packages
>are all packed with bzip2, not gzip.
Yes. As I keep saying (but somehow it seems to consistently be lost in
the translation), I already knew that you could detect the difference
when I sent my original suggestion of using magic numbers.
>I realize the file name detection code exists, so it's easier to leave
>it be than to add more code for magic number checking, but it _is_
>trivial to add magic number checking. For gzip, a matter of checking
>the first 2 bytes of the file, and for bzip2, the first 3 bytes.
It actually is not trivial at all. As I also keep mentioning, it
requires that someone who cares about this will have to actually do it
rather than report that it is possible to do it.
>I think it's more likely that WinZip will add bzip2 decompression than a
>rule to handle *.cgw files as .tar.gz. In other words, bzip2 confusing
>Winzip might be a short-lived state of affairs. If you doubt that, ask
>yourself if, a few years ago, if you would have guessed that WinZip
>would have added tar and gzip code?
I somehow doubt that WinZip would be incapable of uncompressing files
merely becase they have a "non-standard" extension.
This may solve the "Ah. It has a .tar.gz extension so I can use WinZip"
problem, but it does not solve the "Ah. This is some kind of archive,
I wonder if WinZip understands it" problem. Continuing to move towards
.bz2 compression works around the problem temporarily but neither that
nor naming the archives something different are a long term foolproof
solution.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -