Bug#853224: desktop-base: Minor problems with maintainer scripts
Package: desktop-base
Version: 9.0.2
Severity: normal
User: devel@kali.org
Usertags: origin-kali
I'm updating the Kali package based on 9.0.2 and I am thus reviewing the
changes. I found some problems:
* In debian/postrm:
- there are many "$priority" variables used that should be dropped as the
update-alternatives --remove call does not need a priority
- there's a "read theme priority" that should be changed into "read theme"
- you are removing the "desktop-grub.sh" alternative but it's a slave
alternative... aren't those automatically removed?
And in fact, you are removing them twice... in two consecutive loops.
* In debian/preinst:
You have code like this:
if $2 <= 9.0.0~exp1; then
...
if $2 >= 9.0.0~exp1; then
echo "ge 9.0.0~exp1"
...
fi
fi
if $2 < 9.0.0~; then
...
fi
First there's debugging code (the "echo" line) and what's the point of
the embedded check >= 9.0.0~exp1 ? The only way to trigger it is when $2 = 9.0.0~exp1
since it must meet >= 9.0.0~exp1 and <= 9.0.0~exp1 at the same time.
The ordering does not seem very logic. You usally deal with upgrade
problems of older versions first. So it seems to me that you should
do something like this:
if $2 < 9.0.0~; then
...
fi
if $2 = 9.0.0~exp1; then
...
fi
And AFAIK you don't need any other case since 9.0.0~exp1 followed
immediately 8.0.2.
Cheers,
-- System Information:
Debian Release: 9.0
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages desktop-base depends on:
ii dpkg 1.18.18
ii librsvg2-common 2.40.16-1
desktop-base recommends no packages.
Versions of packages desktop-base suggests:
ii gnome 1:3.20+3
-- no debconf information
Reply to: