summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-09-18 13:28:20 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-09-18 13:28:20 +0000
commit805486343d0ac603c29520c5909fca8d443acf03 (patch)
treecc77d651fe8b52e7c6f6ffea0f4f3c25718f66d1 /usr.sbin/pkg_add/OpenBSD/PackingElement.pm
parent09b99511f272f8ef9662bb36e013887082e2f3ae (diff)
framework to be able to distinguish packages installed manually (and thus
wanted by the user) from packages installed automatically to satisfy a dependency.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm21
1 files changed, 20 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index 92841e1a8a1..44700a3a9ad 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.25 2004/09/18 08:14:40 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.26 2004/09/18 13:28:19 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -506,6 +506,9 @@ sub add
if ($args[0] eq 'no-default-conflict') {
shift;
return OpenBSD::PackingElement::NoDefaultConflict->add($plist);
+ } elsif ($args[0] eq 'manual-installation') {
+ shift;
+ return OpenBSD::PackingElement::ManualInstallation->add($plist);
} else {
die "Unknown option: $args[0]";
}
@@ -527,6 +530,22 @@ sub new
bless {}, $class;
}
+package OpenBSD::PackingElement::ManualInstallation;
+our @ISA=qw(OpenBSD::PackingElement::Unique);
+sub category() { 'manual-installation' }
+sub keyword() { 'option' }
+
+sub stringize()
+{
+ return 'manual-installation';
+}
+
+sub new
+{
+ my ($class, @args) = @_;
+ bless {}, $class;
+}
+
# The special elements that don't end in the right place
package OpenBSD::PackingElement::ExtraInfo;
our @ISA=qw(OpenBSD::PackingElement);