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

Bug#648161: autopkgtest: Extracting sources with ~ or + in the version fails

Package: autopkgtest
Version: 2.0.1

When trying to run adt-run against a source package (.dsc) which has +
or ~ in the file name, the files that get copied into the temporary
directory have a wrong name with these characters quoted, leading to
unpack failure. You can reproduce this by getting any package with a ~
or ~ in the version, e. g.:

$ apt-get source aoeui
$ sudo adt-run aoeui_1.5~dfsg-1.dsc --- adt-virt-null
adt-run: trace: $ dsc0-extract: sh -ec <SCRIPT> x /tmp/tmp.4yBupdkPq9/dsc0-build/tmpdir /tmp/tmp.4yBupdkPq9/dsc0/aoeui_1.5~dfsg-1.dsc
+ spec=/tmp/tmp.4yBupdkPq9/dsc0/aoeui_1.5~dfsg-1.dsc
+ pwd
+ origpwd=/tmp/tmp.4yBupdkPq9/dsc0-build
+ cd /tmp/tmp.4yBupdkPq9/dsc0-build
+ TMPDIR=/tmp/tmp.4yBupdkPq9/dsc0-build/tmpdir
+ rm -rf -- /tmp/tmp.4yBupdkPq9/dsc0-build/tmpdir
+ export TMPDIR
+ mkdir -- /tmp/tmp.4yBupdkPq9/dsc0-build/tmpdir
+ dpkg-source -x /tmp/tmp.4yBupdkPq9/dsc0/aoeui_1.5~dfsg-1.dsc
dpkg-source: error: cannot open /tmp/tmp.4yBupdkPq9/dsc0/aoeui_1.5~dfsg-1.dsc: No such file or directory
blame: arg:aoeui_1.5~dfsg-1.dsc dsc:aoeui
badpkg: rules extract failed with exit code 2
adt-run: erroneous package: rules extract failed with exit code 2

I added an "ls -l `dirname $spec`" before the dpkg-source call, which reveals:

+ dirname /tmp/tmp.FzK6XZJXXA/dsc0/aoeui_1.5~dfsg-1.dsc
+ ls -l /tmp/tmp.FzK6XZJXXA/dsc0
total 80
-rw-r--r-- 1 root root  4088 Nov  9 10:22 aoeui_1.5%7Edfsg-1.debian.tar.gz
-rw-r--r-- 1 root root  1173 Nov  9 10:22 aoeui_1.5%7Edfsg-1.dsc
-rw-r--r-- 1 root root 71964 Nov  9 10:22 aoeui_1.5%7Edfsg.orig.tar.gz
+ dpkg-source -x /tmp/tmp.FzK6XZJXXA/dsc0/aoeui_1.5~dfsg-1.dsc

I. e. something is erroneously quoting the file names in the temporary
dsc0 dir. I added debugging to all usages of urllib.quote() and other
places which might be related, but unfortunately I'm not able to
figure out which part of the code actually copies the files and
damages their name. So currently I'm not able to fix this.

The workaround is to extract the source package yourself and run with
"--built-tree ." instead of against the .dsc.



Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

Reply to: