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

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



Hi,
 [This is getting silly, I really have no objection to the proposal]
>>"Kai" == Kai Henningsen <kai@khms.westfalen.de> writes:

Kai> srivasta@datasync.com (Manoj Srivastava) wrote on 12.05.97 in
Kai> <[🔎] 87d8qwcrv2.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.

>> Unless the sources (like angband-2.7.6) just contained a single
>> directory, and unpacked in . (granted, this is a pathological case,
>> but it prevents us from saying we have a fool-proof method).

Kai> There seems to be a communication breakdown somewhere. My above
Kai> method handles *all* cases, without exception, though from your
Kai> description I can't quite make out if angband is the first or the
Kai> second case.

 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.)

	I was being pedantic when I said all source packages can't be
 handled by the algorithm, but it would handle most real world sources
 and IMHO could be considered quite adequate (but not perfect).

Kai> (Actually, I think the idea may orignally have come from Bruce,
Kai> though I won't swear to that. It's kind of a "duh, why didn't I
Kai> think of that" idea.)

>> Anyway, the algorithm above _would* handle most cases, and that
>> might be good enough.

Kai> Nope. It does indeed handle *all* cases. Well, all cases where
Kai> the tar doesn't contain pathnames going outside the current
Kai> directory, but people building tars like that should be shot
Kai> anyway - that's not a tar, that's a breakin attempt.

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

	manoj
 nit-picking
-- 
 "In the Bowling Alley of Tomorrow, there will even be machines that
 wear rental shoes and throw the ball for you. Your sole function will
 be to drink beer." Dave Barry
Manoj Srivastava               <url:mailto:srivasta@acm.org>
Mobile, Alabama USA            <url:http://www.datasync.com/%7Esrivasta/>


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