[Piuparts-commits] rev 725 - in trunk: . debian

Holger Levsen holger at alioth.debian.org
Wed Nov 10 21:44:06 UTC 2010


Author: holger
Date: 2010-11-10 21:43:55 +0000 (Wed, 10 Nov 2010)
New Revision: 725

Modified:
   trunk/debian/changelog
   trunk/piuparts.py
Log:
make Chroot.diff_meta_data() special case and ignore files matching 
/etc/rc.\.d/[SK])[0-9]{2}(.*)$ so that piuparts doesn't complain about
initscripts renamed by insserv. Thanks to by Andreas Beckmann for the
patch! (Closes: #586793)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2010-11-10 21:31:28 UTC (rev 724)
+++ trunk/debian/changelog	2010-11-10 21:43:55 UTC (rev 725)
@@ -45,6 +45,10 @@
       (Closes: #573904)
     - fix --do-not-verify-signatures option (Closes: #574936) - thanks to
       Cleto Martin Angelina for the patch.
+    - make Chroot.diff_meta_data() special case and ignore files matching 
+      /etc/rc.\.d/[SK])[0-9]{2}(.*)$ so that piuparts doesn't complain about
+      initscripts renamed by insserv. Thanks to by Andreas Beckmann for the
+      patch! (Closes: #586793)
   * Add ${misc:Depends} to Depends in debian/control. 
   * Remove versioned dependencies on debhelper, dpkg-dev and debootstrap as
     the versions available in Etch are sufficient.

Modified: trunk/piuparts.py
===================================================================
--- trunk/piuparts.py	2010-11-10 21:31:28 UTC (rev 724)
+++ trunk/piuparts.py	2010-11-10 21:43:55 UTC (rev 725)
@@ -1429,6 +1429,24 @@
     removed = [x for x in tree1.iteritems()]
     new = [x for x in tree2.iteritems()]
 
+    # fix for #586793 by Andreas Beckmann <debian at abeckmann.de>
+    # prune rc?.d symlinks renamed by insserv
+    pat1 = re.compile(r"^(/etc/rc.\.d/[SK])[0-9]{2}(.*)$")
+    for name1, data1 in removed[:]:
+        m = pat1.search(name1)
+        if m:
+            pat2 = re.compile(r"^" + m.group(1) + r"[0-9]{2}" + m.group(2) + 
+r"$")
+            for name2, data2 in new[:]:
+                m = pat2.search(name2)
+                if m:
+                    logging.debug("File was renamed: %s\t=> %s" % (name1, 
+name2))
+                    removed.remove((name1, data1))
+                    new.remove((name2, data2))
+    # this is again special casing due to the behaviour of a single package :(
+    # general tracking of moved files would be the better approach, probably.
+
     return new, removed, modified
 
 




More information about the Piuparts-commits mailing list