[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#161593: apt-utils: apt-ftparchive fumbles on signed debs



On Thu, 19 Sep 2002, Adam Heath wrote:

> > The definitive reference is the 4.5 BSD ar(5) man page and it makes no
> > mention of the /. I suspect the was introduced after that for some reason
> > or another.
> 
> I used an hp manpage.

Well, uh, the HP man page describe an AR format that is different from
that described by 4.4 BSD, and different from what original dpkg-deb
supported.

The HP ar handles filenames with spaces by using / as the terminator.

The BSD ar handles filenames with spaces by using the long filename
mechansim.

The HP long filename mechanism has a long filename table at the end
of the archive in a member with a name of //

The BSD long filename mechanism places /<len> in the archive header and
puts the long file name after the member archive. It also allows a full 16
char filename before going to LFN.

dpkg-deb does not put a trailing / on file names and thus is producing a
BSD Format ar.

Original version of dpkg-deb truely ONLY supported BSD formats, and had
this code:

       if (memcmp(arh.ar_name,"debian-binary   ",sizeof(arh.ar_name)))
          ohshit(_("file `%.250s' is not a debian binary archive (try dpkg-split?)"),debar);

APT is not prepared to deal with the complexities of an AR in the HP
format and I think it is perfectly right to drop it early on. 

Jason




Reply to: