diff options
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 5405852a9de..203637fbc72 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.22 2004/08/11 09:57:50 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.23 2004/09/14 23:04:10 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -329,7 +329,7 @@ package OpenBSD::PackingElement::InfoFile; our @ISA=qw(OpenBSD::PackingElement::FileBase); __PACKAGE__->setKeyword('info'); sub keyword() { "info" } - +sub dirclass() { "OpenBSD::PackingElement::Infodir" } package OpenBSD::PackingElement::Manpage; our @ISA=qw(OpenBSD::PackingElement::FileBase); @@ -797,11 +797,16 @@ sub needs_keyword return $self->stringize() =~ m/\^@/; } +package OpenBSD::PackingElement::Infodir; +our @ISA=qw(OpenBSD::PackingElement::Dir); +sub keyword() { "info" } +sub needs_keyword() { 1 } + package OpenBSD::PackingElement::Fontdir; our @ISA=qw(OpenBSD::PackingElement::Dir); __PACKAGE__->setKeyword('fontdir'); sub keyword() { "fontdir" } -sub needs_keyword { 1 } +sub needs_keyword() { 1 } sub dirclass() { "OpenBSD::PackingElement::Fontdir" } our %fonts_todo = (); @@ -838,10 +843,10 @@ sub restore_fontdir { my $dirname = shift; if (-f "$dirname/fonts.dir.dist") { - require File::Copy; + require OpenBSD::Error; unlink("$dirname/fonts.dir"); - File::Copy::copy("$dirname/fonts.dir.dist", "$dirname/fonts.dir"); + OpenBSD::Error::Copy("$dirname/fonts.dir.dist", "$dirname/fonts.dir"); } } @@ -849,11 +854,13 @@ sub finish_fontdirs { my @l = keys %fonts_todo; if (@l != 0) { + require OpenBSD::Error; + map { update_fontalias($_) } @l; print "You may wish to update your font path for ", join(' ', @l), "\n"; - eval { system("/usr/X11R6/bin/mkfontdir", @l); }; + eval { OpenBSD::Error::System("/usr/X11R6/bin/mkfontdir", @l); }; map { restore_fontdir($_) } @l; - eval { system("/usr/X11R6/bin/fc-cache", @l); }; + eval { OpenBSD::Error::System("/usr/X11R6/bin/fc-cache", @l); }; } } @@ -862,7 +869,7 @@ package OpenBSD::PackingElement::Mandir; our @ISA=qw(OpenBSD::PackingElement::Dir); __PACKAGE__->setKeyword('mandir'); sub keyword() { "mandir" } -sub needs_keyword { 1 } +sub needs_keyword() { 1 } sub dirclass() { "OpenBSD::PackingElement::Mandir" } package OpenBSD::PackingElement::Extra; |