Bug#689257: only remove the initscripts and symlinks on purge

2012-11-02 Thread Salvatore Bonaccorso
Hi Kai

On Wed, Oct 10, 2012 at 08:06:08PM +0200, Kai Storbeck wrote:
 Thanks for your patch.
 
 Since I still have a few outstanding issues to solve, I'm delaying an
 upload.
 
 I'm even thinking of removing the removal of the user, and the rest
 seems to be there due to a bug thats probably fixed now.

roundup is now on the candidate list for removal from testing[1]. So
this issue needs to be dealt with before Wednesday the 7th of Nov. Do
you have time to prepare the fix?

 [1]: https://lists.debian.org/debian-devel/2012/10/msg00687.html

Regards,
Salvatore


signature.asc
Description: Digital signature


Bug#689257: only remove the initscripts and symlinks on purge

2012-10-10 Thread Salvatore Bonaccorso
tags 689257 + patch
thanks

Hi Kai

Note I have not taken any upload action, only attaching here a patch.
The postrm removes the two initscripts, but these should only be
removed on purge. If I'm correctly it should suffice here, moving all
the action to only the purge call, and do nothing else on remove,
abort-install and disappear.

Note: I only had a really quick look and this should/can maybe
further improved.

Regards,
Salvatore
diff -Nru roundup-1.4.20/debian/changelog roundup-1.4.20/debian/changelog
--- roundup-1.4.20/debian/changelog 2012-06-18 23:01:34.0 +0200
+++ roundup-1.4.20/debian/changelog 2012-10-10 16:25:12.0 +0200
@@ -1,3 +1,14 @@
+roundup (1.4.20-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Remove conffiles only on purge.
+Fix deletes conffiles during postrm remove (policy 10.7.3) as roundup
+removed /etc/init.d/roundup, /etc/init.d/roundup-dirs and init script
+links also on remove, abort-install and disappear calls to postrm.
+(Closes: #689257)
+
+ -- Salvatore Bonaccorso car...@debian.org  Wed, 10 Oct 2012 16:07:43 +0200
+
 roundup (1.4.20-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru roundup-1.4.20/debian/roundup.postrm 
roundup-1.4.20/debian/roundup.postrm
--- roundup-1.4.20/debian/roundup.postrm2012-06-18 15:52:46.0 
+0200
+++ roundup-1.4.20/debian/roundup.postrm2012-10-10 16:25:12.0 
+0200
@@ -16,22 +16,24 @@
 
 case $1 in
 
-  remove|purge|abort-install|disappear)
+  purge)
rm -f /etc/init.d/roundup /etc/init.d/roundup-dirs
update-rc.d roundup remove /dev/null
update-rc.d roundup-dirs remove  /dev/null
-   if [ $1 = purge ]; then
-   # handle a dpkg bug
-   [ -d /etc/roundup ]  rmdir --ignore-fail-on-non-empty 
/etc/roundup /dev/null 21
-   [ -d /var/lib/roundup/trackers ]  rmdir 
--ignore-fail-on-non-empty /var/lib/roundup/trackers /dev/null 21
-   [ -d /var/lib/roundup ]  rmdir --ignore-fail-on-non-empty 
/var/lib/roundup /dev/null 21
-   rm -f /var/service/roundup  /dev/null 21
-   rm -fr /etc/roundup/service  /dev/null 21
-   rm -fr /var/run/roundup  /dev/null 21
-   check_and_delete_user
-   check_and_delete_group
-   fi
+   # handle a dpkg bug
+   [ -d /etc/roundup ]  rmdir --ignore-fail-on-non-empty /etc/roundup 
/dev/null 21
+   [ -d /var/lib/roundup/trackers ]  rmdir --ignore-fail-on-non-empty 
/var/lib/roundup/trackers /dev/null 21
+   [ -d /var/lib/roundup ]  rmdir --ignore-fail-on-non-empty 
/var/lib/roundup /dev/null 21
+   rm -f /var/service/roundup  /dev/null 21
+   rm -fr /etc/roundup/service  /dev/null 21
+   rm -fr /var/run/roundup  /dev/null 21
+   check_and_delete_user
+   check_and_delete_group
 ;;
+  remove|abort-install|disappear)
+# do nothing
+;;
+
   upgrade)
 # do nothing
 ;;


signature.asc
Description: Digital signature


Bug#689257: only remove the initscripts and symlinks on purge

2012-10-10 Thread Kai Storbeck
Hi Salvatore,

Thanks for your patch.

Since I still have a few outstanding issues to solve, I'm delaying an
upload.

I'm even thinking of removing the removal of the user, and the rest
seems to be there due to a bug thats probably fixed now.

Regards,
Kai Storbeck

Salvatore Bonaccorso wrote:
 tags 689257 + patch
 thanks
 
 Hi Kai
 
 Note I have not taken any upload action, only attaching here a patch.
 The postrm removes the two initscripts, but these should only be
 removed on purge. If I'm correctly it should suffice here, moving all
 the action to only the purge call, and do nothing else on remove,
 abort-install and disappear.
 
 Note: I only had a really quick look and this should/can maybe
 further improved.
 
 Regards,
 Salvatore



signature.asc
Description: OpenPGP digital signature