This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: press for cygwin


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.

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 says "Bwhaha, this is a WinZip confuser archive.  I will uncompress
> this file with great vigor".  If it sees a .gz file." it thinks "Oh
> well.  I'll uncompress this but I'm not happy about it since the file is
> recognizable to the evil GUI WinZip."

:)

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?

> It's probably possible to add magic number detection to setup.exe to
> circumvent this but then, once again, we're moving into development
> areas that need more than just a good idea for anything to happen.

It _does_ solve two recent issues...
-- 
= Warren -- Video articles: http://www.cyberport.com/~tangent/video/
= 
= ICBM Address: 36.8274040 N, 108.0204086 W, alt. 1714m

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]