summaryrefslogtreecommitdiff
path: root/dh_installxfonts
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-12-29 15:11:44 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-12-29 15:11:44 -0500
commit56a432ea5f488b960248a772ffcabf5bb2cd4ff0 (patch)
tree01e55960e555bd549aaca542d52ff3d1c96e54b4 /dh_installxfonts
parent62e6c442e271f73747fa57f5b4ce5807ce4966af (diff)
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)
Diffstat (limited to 'dh_installxfonts')
-rwxr-xr-xdh_installxfonts12
1 files changed, 8 insertions, 4 deletions
diff --git a/dh_installxfonts b/dh_installxfonts
index 07d6ff1..9cde68b 100755
--- a/dh_installxfonts
+++ b/dh_installxfonts
@@ -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");
}