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 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm') 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); }; -- cgit v1.2.3