summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-06-21 16:33:46 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-06-21 16:33:46 +0000
commit53dd804e65cd1bf7a2c072e04cd765e997065f53 (patch)
treef5c276c2b46b5ad81459caef274377d7ec0bcf17 /usr.sbin/pkg_add/OpenBSD/PackingElement.pm
parent4edb92d8b1de61569023b47a4f16203787c59f2b (diff)
support for old stuff in pkg_info/pkg_delete, e.g., @src
prompted by miod@, okay miod@ millert@.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index 299822de800..2d7e5308844 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
@@ -1,4 +1,4 @@
-# $OpenBSD: PackingElement.pm,v 1.8 2004/03/30 08:53:35 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.9 2004/06/21 16:33:45 espie Exp $
#
# Copyright (c) 2003 Marc Espie.
#
@@ -33,6 +33,7 @@ use OpenBSD::PackageInfo;
package OpenBSD::PackingElement;
use File::Basename;
our %keyword;
+our %oldkeyword;
sub Factory
{
@@ -43,6 +44,9 @@ sub Factory
if (defined $keyword{$cmd}) {
$keyword{$cmd}->add(@_, $args);
+ } elsif (defined $oldkeyword{$cmd}) {
+ $oldkeyword{$cmd}->add(@_, $args);
+ print STDERR "Warning: obsolete construct: \@$cmd $args\n";
} else {
print STDERR "Unknown element: \@$cmd $args\n";
exit(1);
@@ -57,6 +61,11 @@ sub setKeyword {
$keyword{$k} = $class;
}
+sub setOldKeyword {
+ my ($class, $k) = @_;
+ $oldkeyword{$k} = $class;
+}
+
sub category() { 'items' }
sub new