Bug#950110: liboctomap-dev, ...: unhandled symlink to directory conversion: /usr/share/doc/PACKAGE

Andreas Beckmann anbe at debian.org
Tue Jan 28 22:40:15 GMT 2020


Package: liboctomap-dev,liboctovis-dev,octomap-tools,octovis
Version: 1.9.3+dfsg-1
Severity: serious
User: debian-qa at lists.debian.org
Usertags: piuparts

Hi,

an upgrade test with piuparts revealed that your package installs files
over existing symlinks and possibly overwrites files owned by other
packages. This usually means an old version of the package shipped a
symlink but that was later replaced by a real (and non-empty)
directory. This kind of overwriting another package's files cannot be
detected by dpkg.

This was observed on the following upgrade paths:

  buster -> bullseye

For /usr/share/doc/PACKAGE this may not be problematic as long as both
packages are installed, ship byte-for-byte identical files and are
upgraded in lockstep. But once one of the involved packages gets
removed, the other one will lose its documentation files, too,
including the copyright file, which is a violation of Policy 12.5:
https://www.debian.org/doc/debian-policy/ch-docs.html#copyright-information

For other overwritten locations anything interesting may happen.

Note that dpkg intentionally does not replace directories with symlinks
and vice versa, you need the maintainer scripts to do this.
See in particular the end of point 4 in
https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#details-of-unpack-phase-of-installation-or-upgrade

It is recommended to use the dpkg-maintscript-helper commands
'dir_to_symlink' and 'symlink_to_dir' (available since dpkg 1.17.14)
to perform the conversion, ideally using d/$PACKAGE.maintscript.
See dpkg-maintscript-helper(1) and dh_installdeb(1) for details.


>From the attached log (scroll to the bottom...):

0m51.2s ERROR: FAIL: silently overwrites files via directory symlinks:
  /usr/share/doc/liboctomap-dev/changelog.Debian.gz (liboctomap-dev:amd64) != /usr/share/doc/liboctomap1.8/changelog.Debian.gz (liboctomap1.8)
    /usr/share/doc/liboctomap-dev -> liboctomap1.8
  /usr/share/doc/liboctomap-dev/copyright (liboctomap-dev:amd64) != /usr/share/doc/liboctomap1.8/copyright (liboctomap1.8)
    /usr/share/doc/liboctomap-dev -> liboctomap1.8
  /usr/share/doc/liboctomap-dev/examples (liboctomap-dev:amd64) != /usr/share/doc/liboctomap1.8/examples (?)
    /usr/share/doc/liboctomap-dev -> liboctomap1.8
  /usr/share/doc/liboctomap-dev/examples/data (liboctomap-dev:amd64) != /usr/share/doc/liboctomap1.8/examples/data (?)
    /usr/share/doc/liboctomap-dev -> liboctomap1.8
  /usr/share/doc/liboctomap-dev/examples/data/geb079.bt (liboctomap-dev:amd64) != /usr/share/doc/liboctomap1.8/examples/data/geb079.bt (?)
    /usr/share/doc/liboctomap-dev -> liboctomap1.8
  /usr/share/doc/liboctomap-dev/examples/data/mapcoll.txt (liboctomap-dev:amd64) != /usr/share/doc/liboctomap1.8/examples/data/mapcoll.txt (?)
    /usr/share/doc/liboctomap-dev -> liboctomap1.8
  /usr/share/doc/liboctomap-dev/examples/data/scan.dat.bz2 (liboctomap-dev:amd64) != /usr/share/doc/liboctomap1.8/examples/data/scan.dat.bz2 (?)
    /usr/share/doc/liboctomap-dev -> liboctomap1.8
  /usr/share/doc/liboctomap-dev/examples/data/spherical_scan.graph (liboctomap-dev:amd64) != /usr/share/doc/liboctomap1.8/examples/data/spherical_scan.graph (?)
    /usr/share/doc/liboctomap-dev -> liboctomap1.8
  /usr/share/doc/liboctomap-dev/examples/example-project.tgz (liboctomap-dev:amd64) != /usr/share/doc/liboctomap1.8/examples/example-project.tgz (?)
    /usr/share/doc/liboctomap-dev -> liboctomap1.8

1m12.1s ERROR: FAIL: silently overwrites files via directory symlinks:
  /usr/share/doc/liboctovis-dev/changelog.Debian.gz (liboctovis-dev:amd64) != /usr/share/doc/liboctomap1.8/changelog.Debian.gz (liboctomap1.8)
    /usr/share/doc/liboctovis-dev -> liboctomap1.8
  /usr/share/doc/liboctovis-dev/copyright (liboctovis-dev:amd64) != /usr/share/doc/liboctomap1.8/copyright (liboctomap1.8)
    /usr/share/doc/liboctovis-dev -> liboctomap1.8

0m25.1s ERROR: FAIL: silently overwrites files via directory symlinks:
  /usr/share/doc/octomap-tools/changelog.Debian.gz (octomap-tools) != /usr/share/doc/liboctomap1.8/changelog.Debian.gz (liboctomap1.8)
    /usr/share/doc/octomap-tools -> liboctomap1.8
  /usr/share/doc/octomap-tools/copyright (octomap-tools) != /usr/share/doc/liboctomap1.8/copyright (liboctomap1.8)
    /usr/share/doc/octomap-tools -> liboctomap1.8

2m14.0s ERROR: FAIL: silently overwrites files via directory symlinks:
  /usr/share/doc/octovis/changelog.Debian.gz (octovis) != /usr/share/doc/liboctomap1.8/changelog.Debian.gz (liboctomap1.8)
    /usr/share/doc/octovis -> liboctomap1.8
  /usr/share/doc/octovis/copyright (octovis) != /usr/share/doc/liboctomap1.8/copyright (liboctomap1.8)
    /usr/share/doc/octovis -> liboctomap1.8



cheers,

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: liboctomap-dev_1.9.3+dfsg-1.log.gz
Type: application/gzip
Size: 28330 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20200128/cac4efb1/attachment-0001.gz>


More information about the debian-science-maintainers mailing list