Bug#986819: ukui-session-manager: leaves alternatives after upgrade from buster: /usr/bin/x-session-manager -> /etc/alternatives/x-session-manager -> /usr/bin/ukui-session

2021-05-11 Thread handsome_feng
Hi, Andreas,


Sorry for the delay and thanks a lot for your NUM !
I will merge this upstream.


handsome_feng














在2021年05月04 16时47分,"Andreas Beckmann"写道:

Followup-For: Bug #986819
Control: tag -1 pending

Hi,

I've just NMUed the fix to DELAYED/3, please let me know if I should
delay it longer.

Attached is an updated patch fixing the version number in the preinst
s.t. the cleanup also happens if the system was already upgraded to the
buggy bullseye version.


Andreas




Bug#986819: ukui-session-manager: leaves alternatives after upgrade from buster: /usr/bin/x-session-manager -> /etc/alternatives/x-session-manager -> /usr/bin/ukui-session

2021-05-04 Thread Andreas Beckmann
Followup-For: Bug #986819
Control: tag -1 pending

Hi,

I've just NMUed the fix to DELAYED/3, please let me know if I should
delay it longer.

Attached is an updated patch fixing the version number in the preinst
s.t. the cleanup also happens if the system was already upgraded to the
buggy bullseye version.


Andreas
diff -Nru ukui-session-manager-3.0.2/debian/changelog 
ukui-session-manager-3.0.2/debian/changelog
--- ukui-session-manager-3.0.2/debian/changelog 2020-09-27 09:17:37.0 
+0200
+++ ukui-session-manager-3.0.2/debian/changelog 2021-05-04 10:14:20.0 
+0200
@@ -1,3 +1,11 @@
+ukui-session-manager (3.0.2-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Clean up obsolete x-session-manager alternative on upgrades from buster.
+(Closes: #986819)
+
+ -- Andreas Beckmann   Tue, 04 May 2021 10:14:20 +0200
+
 ukui-session-manager (3.0.2-1) unstable; urgency=medium
 
   * New upstream bugfix release.
diff -Nru ukui-session-manager-3.0.2/debian/ukui-session-manager.preinst 
ukui-session-manager-3.0.2/debian/ukui-session-manager.preinst
--- ukui-session-manager-3.0.2/debian/ukui-session-manager.preinst  
1970-01-01 01:00:00.0 +0100
+++ ukui-session-manager-3.0.2/debian/ukui-session-manager.preinst  
2021-05-04 10:14:20.0 +0200
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ] ; then
+   if dpkg --compare-versions "$2" lt-nl "3.0.2-1.0" ; then
+   update-alternatives --remove x-session-manager 
/usr/bin/ukui-session
+   fi
+fi
+
+#DEBHELPER#


Bug#986819: ukui-session-manager: leaves alternatives after upgrade from buster: /usr/bin/x-session-manager -> /etc/alternatives/x-session-manager -> /usr/bin/ukui-session

2021-04-12 Thread Andreas Beckmann
Followup-For: Bug #986819
Control: tag -1 patch

Please apply the attached patch.


Andreas
diff -Nru ukui-session-manager-3.0.2/debian/changelog 
ukui-session-manager-3.0.2/debian/changelog
--- ukui-session-manager-3.0.2/debian/changelog 2020-09-27 09:17:37.0 
+0200
+++ ukui-session-manager-3.0.2/debian/changelog 2021-04-12 13:04:23.0 
+0200
@@ -1,3 +1,10 @@
+ukui-session-manager (3.0.2-2) UNRELEASED; urgency=medium
+
+  * Clean up obsolete x-session-manager alternative on upgrades from buster.
+(Closes: #986819)
+
+ -- Andreas Beckmann   Mon, 12 Apr 2021 13:04:23 +0200
+
 ukui-session-manager (3.0.2-1) unstable; urgency=medium
 
   * New upstream bugfix release.
diff -Nru ukui-session-manager-3.0.2/debian/ukui-session-manager.preinst 
ukui-session-manager-3.0.2/debian/ukui-session-manager.preinst
--- ukui-session-manager-3.0.2/debian/ukui-session-manager.preinst  
1970-01-01 01:00:00.0 +0100
+++ ukui-session-manager-3.0.2/debian/ukui-session-manager.preinst  
2021-04-12 13:04:23.0 +0200
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ] ; then
+   if dpkg --compare-versions "$2" lt-nl "2.0.2-2~" ; then
+   update-alternatives --remove x-session-manager 
/usr/bin/ukui-session
+   fi
+fi
+
+#DEBHELPER#


Bug#986819: ukui-session-manager: leaves alternatives after upgrade from buster: /usr/bin/x-session-manager -> /etc/alternatives/x-session-manager -> /usr/bin/ukui-session

2021-04-12 Thread Andreas Beckmann
Package: ukui-session-manager
Version: 3.0.2-1
Severity: important
User: debian...@lists.debian.org
Usertags: piuparts

Hi,

during a test with piuparts I noticed your package left unowned files on
the system after purge, which is a violation of policy 6.8:

https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#details-of-removal-and-or-configuration-purging

The leftover files are actually alternatives that were installed by the
package but have not been properly removed.

While there is ongoing discussion how to remove alternatives correctly
(see https://bugs.debian.org/71621 for details) the following strategy
should work for regular cases:
* 'postinst configure' always installs the alternative
* 'prerm remove' removes the alternative
* 'postrm remove' and 'postrm disappear' remove the alternative
In all other cases a maintainer script is invoked (e.g. upgrade,
deconfigure) the alternatives are not modified to preserve user
configuration.
Removing the alternative in 'prerm remove' avoids having a dangling link
once the actual file gets removed, but 'prerm remove' is not called in
all cases (e.g. unpacked but not configured packages or disappearing
packages) so the postrm must remove the alternative again
(update-alternatives gracefully handles removal of non-existing
alternatives).

Note that the arguments for adding and removing alternatives differ, for
removal it's 'update-alternatives --remove  '.

Filing this as important as having a piuparts clean archive is a release
goal since lenny.

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

1m46.1s INFO: Warning: Package purging left files on system:
  /etc/alternatives/x-session-manager -> /usr/bin/ukui-session   not owned
  /etc/alternatives/x-session-manager.1.gz -> 
/usr/share/man/man1/ukui-session.1.gz  not owned
  /usr/bin/x-session-manager -> /etc/alternatives/x-session-manager  not 
owned
  /usr/share/man/man1/x-session-manager.1.gz -> 
/etc/alternatives/x-session-manager.1.gz not owned


cheers,

andreas


ukui-session-manager_3.0.2-1.log.gz
Description: application/gzip