summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-05-22 09:39:25 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-05-22 09:39:25 +0000
commit751a61d6290a0e2c7ccc67fee72d686ca1aa44cd (patch)
treefd8e657c716eebf3d1e421d1f4d559c67961d015 /usr.sbin
parentcffd9a0d165dc9c7ceb4ac62c1486ca2df10b040 (diff)
mark `digitalsignature' as a known keyword, which helps me.
Use autovivification on stuff to remove.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Delete.pm18
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm4
2 files changed, 6 insertions, 16 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm
index 9de892a6d42..03eeaa917a4 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.43 2007/05/15 09:32:18 espie Exp $
+# $OpenBSD: Delete.pm,v 1.44 2007/05/22 09:39:23 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -309,10 +309,7 @@ sub delete
print "rmuser: $name\n";
}
- $state->{users_to_rm} = {} unless defined $state->{users_to_rm};
-
- my $h = $state->{users_to_rm};
- $h->{$name} = $state->{pkgname};
+ $state->{users_to_rm}->{$name} = $state->{pkgname};
}
package OpenBSD::PackingElement::NewGroup;
@@ -326,10 +323,7 @@ sub delete
print "rmgroup: $name\n";
}
- $state->{groups_to_rm} = {} unless defined $state->{groups_to_rm};
-
- my $h = $state->{groups_to_rm};
- $h->{$name} = $state->{pkgname};
+ $state->{groups_to_rm}->{$name} = $state->{pkgname};
}
package OpenBSD::PackingElement::DirBase;
@@ -343,12 +337,8 @@ sub delete
print "dirrm: $name\n";
}
- $state->{dirs_to_rm} = {} unless defined $state->{dirs_to_rm};
-
- my $h = $state->{dirs_to_rm};
- $h->{$name} = [] unless defined $h->{$name};
$self->{pkgname} = $state->{pkgname};
- push(@{$h->{$name}}, $self);
+ push(@{$state->{dirs_to_rm}->{$name}}, $self);
}
package OpenBSD::PackingElement::DirRm;
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index 5de41e5272f..cf6dfde14c7 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.112 2007/05/20 17:04:25 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.113 2007/05/22 09:39:24 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -1413,7 +1413,7 @@ sub register_old_keyword
}
for my $k (qw(src display mtree ignore_inst dirrm pkgcfl pkgdep newdepend
- libdepend)) {
+ libdepend digitalsignature)) {
__PACKAGE__->register_old_keyword($k);
}