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

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

For example:

$ ls -FR pool/contrib/b/b43-fwcutter/


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: