Package: readahead-fedora
Version: 2:1.5.6-3
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: origin-ubuntu ubuntu-patch precise

Using 'dpkg-maintscript-helper supports rm_conffile' guards introduces
unreliability into upgrades; it means that the conffile is removed or
not depending on whether dpkg happens to be unpacked before
readahead-fedora.  This seems generally undesirable; it would be better
to enforce a single code path.  (This is academic for Debian because the
version of dpkg in squeeze supported dpkg-maintscript-helper, hence
Severity: wishlist; Ubuntu's last LTS release didn't have a sufficient
version of dpkg for that which is why I care.)

It would be nice to just use dh_installdeb's support for generating
dpkg-maintscript-helper commands, which was introduced in debhelper
8.1.0.  This would remove duplicate code from your maintainer scripts.
Here's a patch:

  * Use maintscript support in dh_installdeb rather than writing out
    dpkg-maintscript-helper commands by hand.  We now simply Pre-Depend on a
    new enough version of dpkg rather than using 'dpkg-maintscript-helper
    supports' guards, leading to more predictable behaviour on upgrades.

diff -u readahead-fedora-1.5.6/debian/control 
readahead-fedora-1.5.6/debian/control
--- readahead-fedora-1.5.6/debian/control
+++ readahead-fedora-1.5.6/debian/control
@@ -2,13 +2,15 @@
 Section: admin
 Priority: optional
 Maintainer: Raphael Geissert <[email protected]>
-Build-Depends: debhelper (>= 6), cdbs, quilt, e2fslibs-dev, libaudit-dev, 
libblkid-dev, autopoint | cvs, autopoint | gettext (<< 0.17-10), autoconf, 
automake
+Build-Depends: debhelper (>= 8.1.0~), cdbs, quilt, e2fslibs-dev, libaudit-dev, 
libblkid-dev, autopoint | cvs, autopoint | gettext (<< 0.17-10), autoconf, 
automake
 Standards-Version: 3.9.2
 Homepage: https://fedorahosted.org/readahead/
 
 Package: readahead-fedora
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, dpkg (>= 1.15.7.2), initscripts 
(>= 2.88dsf-13.3)
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, initscripts (>= 2.88dsf-13.3)
 Conflicts: ureadahead, sreadahead, readahead
 Provides: readahead
 Replaces: readahead
diff -u readahead-fedora-1.5.6/debian/postrm 
readahead-fedora-1.5.6/debian/postrm
--- readahead-fedora-1.5.6/debian/postrm
+++ readahead-fedora-1.5.6/debian/postrm
@@ -16,5 +16,2 @@
 
-dpkg-maintscript-helper rm_conffile /etc/cron.daily/readahead \
-    "2:1.5.6-1" -- "$@"
-
 #DEBHELPER#
diff -u readahead-fedora-1.5.6/debian/preinst 
readahead-fedora-1.5.6/debian/preinst
--- readahead-fedora-1.5.6/debian/preinst
+++ readahead-fedora-1.5.6/debian/preinst
@@ -14,7 +14,2 @@
 
-if dpkg-maintscript-helper supports rm_conffile; then
-    dpkg-maintscript-helper rm_conffile /etc/cron.daily/readahead \
-       "2:1.5.6-1" -- "$@"
-fi
-
 #DEBHELPER#
diff -u readahead-fedora-1.5.6/debian/postinst 
readahead-fedora-1.5.6/debian/postinst
--- readahead-fedora-1.5.6/debian/postinst
+++ readahead-fedora-1.5.6/debian/postinst
@@ -24,9 +24,6 @@
     fi
 fi
 
-dpkg-maintscript-helper rm_conffile /etc/cron.daily/readahead \
-    "2:1.5.6-1" -- "$@"
-
 #DEBHELPER#
 
 # The rest of the code is only meant to be run the first time the
only in patch2:
unchanged:
--- readahead-fedora-1.5.6.orig/debian/maintscript
+++ readahead-fedora-1.5.6/debian/maintscript
@@ -0,0 +1 @@
+rm_conffile /etc/cron.daily/readahead 2:1.5.6-1

Thanks,

-- 
Colin Watson                                       [[email protected]]



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to