Bug#503911: update-cd creates extra directories
On the debian 4.0 r5 Update DVDs, the pool structure generated
contains some package files mistakenly placed in their own
$ ls -FR pool/contrib/b/b43-fwcutter/
As noted by Steve McIntyre on the debian-cd mailing list , 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?