Bug#503911: update-cd creates extra directories
Package: debian-cd
Version: 3.0.5
On the debian 4.0 r5 Update DVDs, the pool structure generated
contains some package files mistakenly placed in their own
directories.
For example:
$ ls -FR pool/contrib/b/b43-fwcutter/
pool/contrib/b/b43-fwcutter/:
b43-fwcutter_011-1~etchnhalf.2_amd64.deb/
pool/contrib/b/b43-fwcutter/b43-fwcutter_011-1~etchnhalf.2_amd64.deb:
b43-fwcutter_011-1~etchnhalf.2_amd64.deb
As noted by Steve McIntyre on the debian-cd mailing list [1], this is
purely a cosmetic bug.
It occurs because the code that strips the filename in the copy_file
function (in update-cd) uses a regular expression that does not
include the "~" character.
DIR=`echo $FILE | sed 's?/[-_\.A-Za-z0-9\+]*$??'`
Adding the ~ character should solve the problem (not tested, sorry!):
DIR=`echo $FILE | sed 's?/[-_\.~A-Za-z0-9\+]*$??'`
Or perhaps dirname is a better alternative?
DIR=`dirname "$FILE"`
--
[1] http://lists.debian.org/debian-cd/2008/10/msg00058.html
Reply to: