summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/Delete.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2014-11-21 15:07:10 +0000
committerMarc Espie <espie@cvs.openbsd.org>2014-11-21 15:07:10 +0000
commit32fc7a72fe52f879f566613a6779635b04149d9e (patch)
tree33dd3263a1d34bfc89ee21fb375579cefe94bbfe /usr.sbin/pkg_add/OpenBSD/Delete.pm
parent18e6d7ce4c8f9ec5c0be694bdd93f6163bee2821 (diff)
a long time ago, DISPLAY and UNDISPLAY required special treatment, as they
were displayed "on the fly". But prepare+log means the display happens later in any case, so they can be done as part of regular plist. Also, mark known manpage dirs for even more verbiage reduction...
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/Delete.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Delete.pm36
1 files changed, 29 insertions, 7 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm
index ef4db3602c0..20c79375754 100644
--- a/usr.sbin/pkg_add/OpenBSD/Delete.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Delete.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Delete.pm,v 1.138 2014/11/20 15:08:21 espie Exp $
+# $OpenBSD: Delete.pm,v 1.139 2014/11/21 15:07:09 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -141,12 +141,6 @@ sub delete_plist
$plist->register_manpage($state, 'rmman');
manpages_unindex($state);
$state->progress->visit_with_size($plist, 'delete', $state);
- if ($plist->has(UNDISPLAY)) {
- my $d = $plist->get(UNDISPLAY)->{d};
- if (!$state->{known_displays}{$$d}) {
- $plist->get(UNDISPLAY)->prepare($state);
- }
- }
}
unregister_dependencies($plist, $state);
@@ -340,6 +334,7 @@ sub record_shared
$self->{pkgname} = $pkgname;
push(@{$recorder->{dirs}{$self->fullname}} , $self);
}
+
package OpenBSD::PackingElement::Fontdir;
sub record_shared
{
@@ -680,4 +675,31 @@ sub copy_old_stuff
OpenBSD::PackingElement::Comment->add($plist, "\@".$self->keyword." ".$self->stringize);
}
+package OpenBSD::PackingElement::FDISPLAY;
+sub delete
+{
+ my ($self, $state) = @_;
+ $state->{known_displays}{$self->{d}->key} = 1;
+ $self->SUPER::delete($state);
+}
+
+package OpenBSD::PackingElement::FUNDISPLAY;
+sub delete
+{
+ my ($self, $state) = @_;
+ my $d = $self->{d};
+ if (!$state->{known_displays}{$self->{d}->key}) {
+ $self->prepare($state);
+ }
+ $self->SUPER::delete($state);
+}
+
+package OpenBSD::PackingElement::Mandir;
+sub delete
+{
+ my ($self, $state) = @_;
+ $state->{knownmandirs}{$self->fullname} = 1;
+ $self->SUPER::delete($state);
+}
+
1;