apt-move cannot copy/move packages whose filenames contain spaces

Bug #214043 reported by drink
4
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/apt/archives/compiz_1:0.6.2: No such file or directory

md5sum: git20071119-0ubuntu1~gutsy1_all.deb: No such file or directory

md5sum: /var/cache/apt/archives/compiz-core_1:0.6.2: No such file or directory

md5sum: git20071119-0ubuntu1~gutsy1_i386.deb: No such file or directory

md5sum: /var/cache/apt/archives/compiz-gnome_1:0.6.2: No such file or directory

md5sum: git20071119-0ubuntu1~gutsy1_i386.deb: No such file or directory

md5sum: /var/cache/apt/archives/compiz-plugins_1:0.6.2: No such file or directory

md5sum: git20071119-0ubuntu1~gutsy1_i386.deb: No such file or directory

md5sum: /var/cache/apt/archives/ffmpeg_3:0.cvs20070307-5ubuntu4: No such file or directory

md5sum: medibuntu3_i386.deb: No such file or directory

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/apt/archives/compiz_1:0.6.2': No such file or directory

dpkg-deb returned nothing on /var/cache/apt/archives/compiz_1:0.6.2

dpkg-deb: failed to read archive `/var/cache/apt/archives/compiz-core_1:0.6.2': No such file or directory

dpkg-deb returned nothing on /var/cache/apt/archives/compiz-core_1:0.6.2

dpkg-deb: failed to read archive `/var/cache/apt/archives/compiz-gnome_1:0.6.2': No such file or directory

dpkg-deb returned nothing on /var/cache/apt/archives/compiz-gnome_1:0.6.2

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.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Filenames for source packages and binary packages should not contain spaces.

Changed in apt-move:
importance: Undecided → Wishlist
Changed in apt-move (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.