Bug#228097: apt doesn't quote package filenames passed to dpkg
On Fri, Jan 16, 2004 at 07:00:39PM +0200, Martin Tsachev wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Friday 16 January 2004 18:23, Matt Zimmerman wrote:
> > On Fri, Jan 16, 2004 at 05:41:24PM +0200, Martin Tsachev wrote:
> > > If I move some files from /var/cache/apt/archives and symlink to them I
> > > can uninstall and then install again a package only if the parent
> > > directory does not contain spaces. If there are spaces apt will fail to
> > > quote the filename and dpkg errors.
> >
> > Can you show me an example of what you mean? I do not think that apt
> > would dereference the symlinks at all.
>
>
> apt-get install mc
>
> installed, I get /var/cache/apt/archives/mc-something.deb
>
> now move mc-something.deb in /data/backup/debian 2004-01-16/
> ln -sf "/backup/debian 2004-01-16/mc-something.deb" /var/cache/apt/archives/
> mc-something.deb
>
> apt-get remove mc
>
>
> Now if you do apt-get install mc again it will fail.
This works fine for me. Here is a transcript of it working:
mizar:[/tmp] ls -l /space/cache/apt/archives/tvtime_0.9.12-2_i386.deb
lrwxrwxrwx 1 root root 41 2004-01-16 09:09 /space/cache/apt/archives/tvtime_0.9.12-2_i386.deb -> /tmp/foo bar baz/tvtime_0.9.12-2_i386.deb
mizar:[/tmp] ls -l /space/cache/apt/archives/tvtime_0.9.12-2_i386.deb
lrwxrwxrwx 1 root root 41 2004-01-16 09:09 /space/cache/apt/archives/tvtime_0.9.12-2_i386.deb -> /tmp/foo bar baz/tvtime_0.9.12-2_i386.deb
mizar:[/tmp] sudo apt-get remove tvtime && sudo apt-get install tvtime
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
tvtime
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 1368kB disk space will be freed.
Do you want to continue? [Y/n]
Reading changelogs... Done
(Reading database ... 102121 files and directories currently installed.)
Removing tvtime ...
Reading Package Lists... Done
Building Dependency Tree... Done
Suggested packages:
libdscaler
The following NEW packages will be installed:
tvtime
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/585kB of archives.
After unpacking 1368kB of additional disk space will be used.
Reading changelogs... Done
Preconfiguring packages ...
Selecting previously deselected package tvtime.
(Reading database ... 102066 files and directories currently installed.)
Unpacking tvtime (from .../tvtime_0.9.12-2_i386.deb) ...
Setting up tvtime (0.9.12-2) ...
Creating video devices in `/dev'.
.devfsd presence implies active DevFS. Aborting MAKEDEV invocation.
mizar:[/tmp] ls -l /space/cache/apt/archives/tvtime_0.9.12-2_i386.deb
lrwxrwxrwx 1 root root 41 2004-01-16 09:09 /space/cache/apt/archives/tvtime_0.9.12-2_i386.deb -> /tmp/foo bar baz/tvtime_0.9.12-2_i386.deb
mizar:[/tmp]
Can you show me a _transcript_ of it failing? It seems clear that your
problem likely has nothing to do with either dpkg or spaces in the filename.
> E: I wasn't able to locate a file for the mc package. This might mean you need
> to manually fix this package. (due to missing arch)
This error is from apt, not dpkg (dpkg is not invoked yet, and won't be
because of this error).
--
- mdz
Reply to: