[Pkg-net-snmp-devel] Bug#709087: snmp{, d}: copyright file missing after upgrade (policy 12.5)

Andreas Beckmann anbe at debian.org
Mon May 20 18:10:03 UTC 2013


Package: snmp,snmpd
Version: 5.7.2~dfsg-4
Severity: serious
User: debian-qa at lists.debian.org
Usertags: piuparts

Hi,

a test with piuparts revealed that your package misses the copyright
file after an upgrade, which is a violation of Policy 12.5:
http://www.debian.org/doc/debian-policy/ch-docs.html#s-copyrightfile

After the upgrade /usr/share/doc/$PACKAGE/ is just an empty directory.

This was observed on the following upgrade paths:

  testing -> sid

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

  MISSING COPYRIGHT FILE: /usr/share/doc/snmp/copyright
  # ls -lad /usr/share/doc/snmp
  drwxr-xr-x 2 root root 40 May 15 18:56 /usr/share/doc/snmp
  # ls -la /usr/share/doc/snmp/
  total 0
  drwxr-xr-x  2 root root   40 May 15 18:56 .
  drwxr-xr-x 85 root root 1820 May 15 18:56 ..

  MISSING COPYRIGHT FILE: /usr/share/doc/snmpd/copyright
  # ls -lad /usr/share/doc/snmpd
  drwxr-xr-x 2 root root 40 May 15 19:07 /usr/share/doc/snmpd
  # ls -la /usr/share/doc/snmpd/
  total 0
  drwxr-xr-x  2 root root   40 May 15 19:07 .
  drwxr-xr-x 88 root root 1880 May 15 19:07 ..


Additional info may be available here:
http://wiki.debian.org/MissingCopyrightFile

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
http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-unpackphase

For switching from a directory to a symlink the *postinst* script
should do something like this:

        DOCDIR=/usr/share/doc/@@PACKAGE@@
        DOCLINK=@@OTHERPACKAGE@@

        if [ -d $DOCDIR ] && [ ! -L $DOCDIR ]; then
                rmdir $DOCDIR
                ln -s $DOCLINK $DOCDIR
        fi

For switching from a symlink to a directory, the *preinst* script
should do something like this:

        DOCDIR=/usr/share/doc/@@PACKAGE@@

        if [ -L $DOCDIR ]; then
                rm $DOCDIR
        fi


cheers,

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snmp_5.7.2~dfsg-4.log.gz
Type: application/x-gzip
Size: 15811 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-net-snmp-devel/attachments/20130520/82ada751/attachment.bin>


More information about the Pkg-net-snmp-devel mailing list