summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/pkg_delete
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2003-10-19 18:42:56 +0000
committerMarc Espie <espie@cvs.openbsd.org>2003-10-19 18:42:56 +0000
commite380d718ff827092ee64d19268e9d643e0dd0f47 (patch)
tree17c1713570163b8904e80731c57f124cef951689 /usr.sbin/pkg_add/pkg_delete
parent4d17b19c65526769e339f93939fb98ede968953f (diff)
plist's has/get methods for accessing elements: perl ->{} has quirks
that make it unusable for looking up constants correctly.
Diffstat (limited to 'usr.sbin/pkg_add/pkg_delete')
-rw-r--r--usr.sbin/pkg_add/pkg_delete12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete
index d5d26295538..51ca34c28a6 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.1 2003/10/16 17:43:34 espie Exp $
+# $OpenBSD: pkg_delete,v 1.2 2003/10/19 18:42:55 espie Exp $
#
# Copyright (c) 2003 Marc Espie.
#
@@ -250,12 +250,12 @@ sub delete_package
die "Package $pkgname real name does not match";
}
- if ($plist->{OpenBSD::PackageInfo::REQUIRE}) {
- $plist->{OpenBSD::PackageInfo::REQUIRE}->delete($state);
- }
- if ($plist->{OpenBSD::PackageInfo::DEINSTALL}) {
- $plist->{OpenBSD::PackageInfo::DEINSTALL}->delete($state);
+ if ($plist->has(REQUIRE)) {
+ $plist->get(REQUIRE)->delete($state);
}
+ if ($plist->has(DEINSTALL)) {
+ $plist->get(DEINSTALL)->delete($state);
+ }
for my $item (@{$plist->{items}}) {
$item->delete($state);
}