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

Bug#519269: lintian: diversion check complains about diversons following policy



Package: lintian
Version: 2.2.7
Severity: important

Hi,

E: openoffice.org-qa-tools: remove-of-unknown-diversion usr/lib/openoffice/basis3.0/presets/basic/Standard/script.xlb postrm:102
N: 
N:    The maintainer script removes a diversion that it didn't add. If you're
N:    cleaning up unnecessary diversions from older versions of the package,
N:    remove them in preinst or postinst instead of waiting for postrm to do
N:    it.
N:    
N:    Severity: important, Certainty: certain
N: 
E: openoffice.org-qa-tools: orphaned-diversion usr/lib/openoffice/basis3.0/presets/basic/Standard/script.xlb preinst
N: 
N:    A diversion was added for the file, but not removed. This means your
N:    package doesn't restore the previous state after removal.
N:    
N:    Severity: important, Certainty: certain
N: 

Let's look at the files:

--- snip ---
#!/bin/sh

# postrm script for openoffice.org-qa-tools

THIS_PACKAGE=openoffice.org-qa-tools
THIS_SCRIPT=postrm

set -e

#INCLUDE_SHELL_LIB#

case "$1" in remove)
	dpkg-divert --package $THIS_PACKAGE --remove --rename --divert \
	    /usr/lib/openoffice/basis3.0/presets/basic/Standard/script.xlb.no-smoketest \
	    /usr/lib/openoffice/basis3.0/presets/basic/Standard/script.xlb
	;;
esac

#DEBHELPER#

exit 0
--- snip --

--- snip ---
#!/bin/sh

# preinst script for openoffice.org-qa-tools

THIS_PACKAGE=openoffice.org-qa-tools
THIS_SCRIPT=preinst

set -e

#INCLUDE_SHELL_LIB#

case "$1" in install|upgrade)
	dpkg-divert --package $THIS_PACKAGE --add --rename --divert \
	    /usr/lib/openoffice/basis3.0/presets/basic/Standard/script.xlb.no-smoketest \
	    /usr/lib/openoffice/basis3.0/presets/basic/Standard/script.xlb
	;;
esac

#DEBHELPER#

exit 0
--- snip ---

This both is *exactly* what is written in policy, Appendix E.
(well, except if test -> case)

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.28-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages lintian depends on:
ii  binutils               2.19.1-1          The GNU assembler, linker and bina
ii  diffstat               1.46-1            produces graph of changes introduc
ii  dpkg-dev               1.14.25           Debian package development tools
ii  file                   4.26-2            Determines file type using "magic"
ii  gettext                0.17-6            GNU Internationalization utilities
ii  intltool-debian        0.35.0+20060710.1 Help i18n of RFC822 compliant conf
ii  libipc-run-perl        0.82-1            Perl module for running processes
ii  libparse-debianchangel 1.1.1-2           parse Debian changelogs and output
ii  libtimedate-perl       1.1600-9          Time and date functions for Perl
ii  liburi-perl            1.37+dfsg-1       Manipulates and accesses URI strin
ii  man-db                 2.5.4-1           on-line manual pager
ii  perl [libdigest-sha-pe 5.10.0-19         Larry Wall's Practical Extraction 

lintian recommends no packages.

Versions of packages lintian suggests:
pn  binutils-multiarch            <none>     (no description available)
ii  libtext-template-perl         1.44-1.2   Text::Template perl module
ii  man-db                        2.5.4-1    on-line manual pager

-- debconf-show failed



Reply to: