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

Re: Proposal: New source format (was Re: [Fwd: Re: dpkg question])

srivasta@datasync.com (Manoj Srivastava)  wrote on 13.05.97 in <87d8qvdq9i.fsf@tiamat.datasync.com>:

> >> >>"Kai" == Kai Henningsen <kai@khms.westfalen.de> writes:

Kai>> Well, yes. Scan the temp dir after unpacking. If it contains one
Kai>> directory and nothing else, that directory is the main package
Kai>> directory. If it contains anything else, the temp dir is the main
Kai>> package dir. Rename the right directory to the right name and
Kai>> place, and if the temp dir is still around, throw it away.

>  package A:, in A-1.0.tar.gz;
>  % tar zfx A-1.0.tar.gz
>  ./B
>  ./B/C
>  ./B/C/D
>  ./B/C/D/1
>  ./B/C/D/2
>  ./B/C/D/3
>  ./B/C/D/4
>  ./B/C/D/5
>  Though this is pathological, I have really seen sources on the net
>  distributed like this (though I don't think current packages have
>  sources anything this wierd.)

Well, we can do one of two things. We can either say that B _is_ the main  
package dir, or if we don't want that, we can recurse until we find  
something different than a single dir.

Both are easy.

> 	Oh yes, pathanmes with .. components would _also_ break the
>  algorithm.

Of course, those break everything. I'd insist of having no tarballs even  
in the Debian source archive that contain those.

A different problem is absolute path names (/X/Y/Z). GNU tar automatically  
discards the "/" (which may, in fact, be related to distributions like the  
above example) on both tarring and untarring, as far as I remember, unless  
you explicitely tell it not to; but other tars don't. So do we insist on  
repacking tars with absolute path names?

MfG Kai

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: