diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-12-29 15:11:44 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-12-29 15:11:44 -0500 |
commit | 56a432ea5f488b960248a772ffcabf5bb2cd4ff0 (patch) | |
tree | 01e55960e555bd549aaca542d52ff3d1c96e54b4 | |
parent | 62e6c442e271f73747fa57f5b4ce5807ce4966af (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)
-rw-r--r-- | debian/changelog | 4 | ||||
-rwxr-xr-x | dh_installxfonts | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index b30a9adb..bc2da744 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/dh_installxfonts b/dh_installxfonts index 07d6ff1d..9cde68bb 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"); } |