apt-move cannot copy/move packages whose filenames contain spaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt-move (Ubuntu) |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Binary package hint: apt-move
I'm working on building a pooled package repository with apt-move for my own use. This has turned out to be surprisingly undocumented. I'm making a lot of progress and have apt-move working for me and not against me, have figured out how to make Contents files for copies of Ubuntu install disc pooled repos, et cetera. But now I have discovered that apt-move chokes when you have packages with spaces in the names. This appears to be a common problem with xargs (which it appears is how the problem ends up here.) If the input is changed such that newlines become NULs and we use the -0 option to xargs (null terminated) then it seems that the problem should go away. But I'm no expert :)
Here's some sample output:
~$ sudo apt-move update
[sudo] password for drink:
Updating from local Packages files...
Moving files...
md5sum: /var/cache/
md5sum: git20071119-
md5sum: /var/cache/
md5sum: git20071119-
md5sum: /var/cache/
md5sum: git20071119-
md5sum: /var/cache/
md5sum: git20071119-
md5sum: /var/cache/
md5sum: medibuntu3_
It goes on for a while before printing the names of packages which are being successfully added to the repo. (I have delete disabled at this stage.)
I tried changing the md5sum run by xargs to options -0r, and added "tr '\n' '\0' |" before xargs. This got me to a new error:
~$ sudo ./apt-move update
Updating from local Packages files...
Moving files...
dpkg-deb: failed to read archive `/var/cache/
dpkg-deb returned nothing on /var/cache/
dpkg-deb: failed to read archive `/var/cache/
dpkg-deb returned nothing on /var/cache/
dpkg-deb: failed to read archive `/var/cache/
dpkg-deb returned nothing on /var/cache/
I went ahead and ran the script -x and it proceeded to run off into the lands of awk and perl where I dare not and choose not to go, respectively. But hopefully this information is helpful.
Changed in apt-move (Ubuntu): | |
status: | New → Confirmed |
Filenames for source packages and binary packages should not contain spaces.