]> git.donarmstrong.com Git - debhelper.git/commitdiff
dh_installxfonts: Use new update-fonts-alias --include and --exclude options to bette...
authorJoey Hess <joey@gnu.kitenet.net>
Tue, 29 Dec 2009 20:11:44 +0000 (15:11 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Tue, 29 Dec 2009 20:11:44 +0000 (15:11 -0500)
debian/changelog
dh_installxfonts

index b30a9adb89840891fd16e1146e914a529f4d66af..bc2da744cd1fb9b9c2f11da751dccffcb2fe9958 100644 (file)
@@ -5,6 +5,10 @@ debhelper (7.4.11) UNRELEASED; urgency=low
   * dh(1): Add an example of using an override target to avoid
     dh running several commands. Closes: #560600
   * dh_installman: Avoid doubled slashes in path. Closes: #561275
+  * dh_installxfonts: Use new update-fonts-alias --include and
+    --exclude options to better handle removal in the case where
+    xfonts-utils is removed before a font package is purged.
+    (#543512; thanks, Theppitak Karoonboonyanan)
 
  -- Joey Hess <joeyh@debian.org>  Mon, 14 Dec 2009 19:23:25 -0500
 
index 07d6ff1d1137ee096e3b717b40d8042c4c499950..9cde68bb2f1f8e19066fedebe8e1c2606969167c 100755 (executable)
@@ -61,19 +61,23 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                # Figure out what commands the postinst and postrm will need 
                # to call.
                my @cmds;
+               my @cmds_postinst;
+               my @cmds_postrm;
                foreach my $f (@fontdirs) {
                        # This must come before update-fonts-dir.
                        push @cmds, "update-fonts-scale $f"
                                if -f "$tmp/etc/X11/fonts/$f/$package.scale";
                        push @cmds, "update-fonts-dir --x11r7-layout $f";
-                       push @cmds, "update-fonts-alias $f"
-                               if -f "$tmp/etc/X11/fonts/$f/$package.alias";
+                       if (-f "$tmp/etc/X11/fonts/$f/$package.alias") {
+                               push @cmds_postinst, "update-fonts-alias --include /etc/X11/fonts/$f/$package.alias $f";
+                               push @cmds_postrm, "update-fonts-alias --exclude /etc/X11/fonts/$f/$package.alias $f";
+                       }
                }
 
                autoscript($package, "postinst", "postinst-xfonts",
-                       "s:#CMDS#:".join(";", @cmds).":;");
+                       "s:#CMDS#:".join(";", @cmds).";".join(";", @cmds_postinst).":;");
                autoscript($package, "postrm", "postrm-xfonts",
-                       "s:#CMDS#:".join(";", @cmds).":;");
+                       "s:#CMDS#:".join(";", @cmds).";".join(";", @cmds_postrm).":;");
 
                addsubstvar($package, "misc:Depends", "xfonts-utils");
        }