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

Bug#31256: dpkg-divert bug

Package: dpkg

dpkg registers the diversion even if the renaming of the file to be diverted
fails (eg. the partition is mounted read-only).
Therefore, after the problem is fixed (I remounted the partition rw),
reinstallation of the package does not rename the diverted file anymore but
overwrite it.

IMO, dpkg-divert should not register the diversion when rename() fails.

Below is the output of dpkg when it failed the first time.


# dpkg -i /disks/debian2/dists/slink/main/binary-all/base/dpkg-multicd_0.11.deb 
(Reading database ... 29460 files and directories currently installed.)
Unpacking dpkg-multicd (from .../base/dpkg-multicd_0.11.deb) ...
Leaving `diversion of /usr/bin/dpkg-scanpackages to
/usr/bin/dpkg-scanpackages.dpkg by dpkg-multicd'
Adding `diversion of /usr/man/man8/dpkg-scanpackages.8.gz to
/usr/man/man8/dpkg-scanpackages.dpkg.8.gz by dpkg-multicd'
dpkg-divert: rename: rename `/usr/man/man8/dpkg-scanpackages.8.gz' to
`/usr/man/man8/dpkg-scanpackages.dpkg.8.gz': Read-only file system
dpkg: error processing
 subprocess pre-installation script returned error exit status 2
Errors were encountered while processing:

# dpkg -S /usr/bin/dpkg-scanpackages
diversion by dpkg-multicd from: /usr/bin/dpkg-scanpackages
diversion by dpkg-multicd to: /usr/bin/dpkg-scanpackages.dpkg
dpkg-dev, dpkg-multicd: /usr/bin/dpkg-scanpackages

# ls -l /usr/bin/dpkg-scanpackages*
-rwxr-xr-x   1 root     root         6388 Nov 22 21:06

 Eric Delaunay                 | "La guerre justifie l'existence des militaires.
 delaunay@lix.polytechnique.fr | En les supprimant." Henri Jeanson (1900-1970)

Reply to: