diff options
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 86 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_create | 37 |
2 files changed, 8 insertions, 115 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 10a8b090e81..c0423422585 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.94 2007/05/01 18:22:20 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.95 2007/05/01 18:46:02 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -645,52 +645,6 @@ sub keyword() { "conflict" } __PACKAGE__->register_with_factory; sub category() { "conflict" } -package OpenBSD::PackingElement::PkgConflict; -our @ISA=qw(OpenBSD::PackingElement::Conflict); - -sub keyword() { "pkgcfl" } -__PACKAGE__->register_with_factory; -sub category() { "pkgcfl" } - -package OpenBSD::PackingElement::PkgDep; -our @ISA=qw(OpenBSD::PackingElement::Depend); - -sub signature -{ -} - -sub keyword() { "pkgdep" } -__PACKAGE__->register_with_factory; -sub category() { "pkgdep" } - -package OpenBSD::PackingElement::NewDepend; -our @ISA=qw(OpenBSD::PackingElement::Depend); - -sub keyword() { "newdepend" } -__PACKAGE__->register_with_factory; -sub category() { "newdepend" } - -sub new -{ - my ($class, $args) = @_; - my ($name, $pattern, $def) = split /\:/, $args; - my $self = bless { pattern => $pattern, def => $def }, $class; - # very old packages still work - if ($name =~ m|/|) { - $self->{pkgpath} = $name; - } else { - $self->{name} = $name; - } - return $self; -} - -sub stringize($) -{ - my $self = $_[0]; - return (defined $self->{name} ? $self->{name} : $self->{pkgpath}). - ':'.$self->{pattern}.':'.$self->{def}; -} - package OpenBSD::PackingElement::Dependency; our @ISA=qw(OpenBSD::PackingElement::Depend); @@ -724,35 +678,6 @@ sub signature $hash->{$self->{name}} = 1; } -package OpenBSD::PackingElement::LibDepend; -our @ISA=qw(OpenBSD::PackingElement::Depend); - -sub category() { "libdepend" } -sub keyword() { "libdepend" } -__PACKAGE__->register_with_factory; - -sub new -{ - my ($class, $args) = @_; - my ($name, $libspec, $pattern, $def) = split /\:/, $args; - my $self = bless { libspec => $libspec, pattern => $pattern, - def => $def }, $class; - # very old packages still work - if ($name =~ m|/|) { - $self->{pkgpath} = $name; - } else { - $self->{name} = $name; - } - return $self; -} - -sub stringize($) -{ - my $self = $_[0]; - return (defined $self->{name} ? $self->{name} : $self->{pkgpath}). - ':'.$self->{libspec}.':'.$self->{pattern}.':'.$self->{def}; -} - package OpenBSD::PackingElement::PkgPath; our @ISA=qw(OpenBSD::PackingElement::Meta); @@ -1071,12 +996,6 @@ __PACKAGE__->register_with_factory; package OpenBSD::PackingElement::DirlikeObject; our @ISA=qw(OpenBSD::PackingElement::FileObject); -package OpenBSD::PackingElement::DirRm; -our @ISA=qw(OpenBSD::PackingElement::DirlikeObject); - -sub keyword() { "dirrm" } -__PACKAGE__->register_with_factory; - package OpenBSD::PackingElement::DirBase; our @ISA=qw(OpenBSD::PackingElement::DirlikeObject); @@ -1404,7 +1323,8 @@ sub register_old_keyword $class->register_with_factory($k, bless \$k, $class); } -for my $k (qw(src display mtree ignore_inst)) { +for my $k (qw(src display mtree ignore_inst dirrm pkgcfl pkgdep newdepend + libdepend)) { __PACKAGE__->register_old_keyword($k); } diff --git a/usr.sbin/pkg_add/pkg_create b/usr.sbin/pkg_add/pkg_create index 3844a36238e..876e5afed6d 100644 --- a/usr.sbin/pkg_add/pkg_create +++ b/usr.sbin/pkg_add/pkg_create @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_create,v 1.83 2007/04/30 13:51:32 espie Exp $ +# $OpenBSD: pkg_create,v 1.84 2007/05/01 18:46:02 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -65,19 +65,6 @@ sub avert_duplicates_and_other_checks $allfiles->{$n} = 1; } -my $warned; - -sub warn_once -{ - my $self = shift; - my $k = $self->keyword; - if (!$warned->{$k}) { - print STDERR "Error: \@$k is deprecated\n"; - $main::errors++; - $warned->{$k} = 1; - } -} - sub makesum_plist { my ($self, $plist, $base, $stash, $infodir) = @_; @@ -168,24 +155,6 @@ sub prepare_for_archival return $o; } -package OpenBSD::PackingElement::PkgConflict; -sub avert_duplicates_and_other_checks -{ - shift->warn_once; -} - -package OpenBSD::PackingElement::PkgDep; -sub avert_duplicates_and_other_checks -{ - shift->warn_once; -} - -package OpenBSD::PackingElement::DirRm; -sub avert_duplicates_and_other_checks -{ - shift->warn_once; -} - package OpenBSD::PackingElement::SpecialFile; sub archive { @@ -598,6 +567,10 @@ if ($plist->{need_modules}) { print STDERR "Error: some needed modules were not found\n"; $errors++; } +if ($plist->{deprecated}) { + print STDERR "Error: found obsolete constructs\n"; + exit 1; +} unless (defined $opt_q && defined $opt_n) { |