From aa74f9b621b34118178bc84e5b9b8570f634f72d Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Thu, 11 Nov 2004 11:23:05 +0000 Subject: don't touch font directories if -n either... --- usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 6 ++++-- usr.sbin/pkg_add/pkg_add | 4 ++-- usr.sbin/pkg_add/pkg_delete | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index ccbbdfbc11e..e9127b10073 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingElement.pm,v 1.62 2004/11/07 11:48:42 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.63 2004/11/11 11:23:04 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie # @@ -1080,12 +1080,14 @@ sub restore_fontdir sub finish_fontdirs { + my $state = shift; my @l = keys %fonts_todo; if (@l != 0) { require OpenBSD::Error; - map { update_fontalias($_) } @l; + map { update_fontalias($_) } @l unless $state->{not}; print "You may wish to update your font path for ", join(' ', @l), "\n"; + return if $state->{not}; eval { OpenBSD::Error::System("/usr/X11R6/bin/mkfontdir", @l); }; map { restore_fontdir($_) } @l; eval { OpenBSD::Error::System("/usr/X11R6/bin/fc-cache", @l); }; diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index ed7b930d7d5..5bb4d14ce53 100644 --- a/usr.sbin/pkg_add/pkg_add +++ b/usr.sbin/pkg_add/pkg_add @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_add,v 1.100 2004/11/11 11:16:39 espie Exp $ +# $OpenBSD: pkg_add,v 1.101 2004/11/11 11:23:04 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie # @@ -710,7 +710,7 @@ while (my $pkg = shift @todo) { my $dielater = $@; -OpenBSD::PackingElement::Fontdir::finish_fontdirs(); +OpenBSD::PackingElement::Fontdir::finish_fontdirs($state); manpages_index($state); OpenBSD::PackingElement::Lib::ensure_ldconfig($state); # delayed directory/user/group removal diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete index 740bf41ace1..26b04ca7687 100644 --- a/usr.sbin/pkg_add/pkg_delete +++ b/usr.sbin/pkg_add/pkg_delete @@ -1,6 +1,6 @@ #!/usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_delete,v 1.71 2004/11/11 11:16:39 espie Exp $ +# $OpenBSD: pkg_delete,v 1.72 2004/11/11 11:23:04 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie # @@ -197,7 +197,7 @@ if (defined $state->{dirs_to_rm} or defined $state->{users_to_rm} or OpenBSD::SharedItems::cleanup($state); } -OpenBSD::PackingElement::Fontdir::finish_fontdirs(); +OpenBSD::PackingElement::Fontdir::finish_fontdirs($state); if ($state->{beverbose}) { OpenBSD::Vstat::tally(); -- cgit v1.2.3