summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2012-04-28 11:53:54 +0000
committerMarc Espie <espie@cvs.openbsd.org>2012-04-28 11:53:54 +0000
commitd7a9b2a5281993ac77307643577707edd1591890 (patch)
treef7e181017e80719e0aaf3d9188f2db2b0e2edf58 /usr.sbin/pkg_add
parent4610e5b24343a83b468f00256a56c32a8ffd6b85 (diff)
add a "fake" handle class for base system updates and ForwardDependencies
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Handle.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Handle.pm b/usr.sbin/pkg_add/OpenBSD/Handle.pm
index 95863054ad1..2a8cfb83b19 100644
--- a/usr.sbin/pkg_add/OpenBSD/Handle.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Handle.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Handle.pm,v 1.29 2011/08/26 08:46:09 espie Exp $
+# $OpenBSD: Handle.pm,v 1.30 2012/04/28 11:53:53 espie Exp $
#
# Copyright (c) 2007-2009 Marc Espie <espie@openbsd.org>
#
@@ -33,6 +33,8 @@ use constant {
CANT_DELETE => 5,
};
+sub is_real { return 1; }
+
sub cleanup
{
my ($self, $error, $errorinfo) = @_;
@@ -55,6 +57,12 @@ sub new
return bless {}, $class;
}
+sub system
+{
+ my $class = shift;
+ return OpenBSD::Handle::BaseSystem->new;
+}
+
sub pkgname
{
my $self = shift;
@@ -254,4 +262,10 @@ sub complete
}
}
+package OpenBSD::Handle::BaseSystem;
+our @ISA = qw(OpenBSD::Handle);
+sub pkgname { return "BaseSystem"; }
+
+sub is_real { return 0; }
+
1;