summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-05-01 18:46:03 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-05-01 18:46:03 +0000
commit6df22bec0785ffd54a2f4233e9a6238ac919c4ab (patch)
tree23714e2c77a282f0681e35bd0e92eb164a3b3d23 /usr.sbin
parent181b010f3e7fb92df870946f8e586102481272ed (diff)
kill old constructs that have been deprecated since 2004.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm86
-rw-r--r--usr.sbin/pkg_add/pkg_create37
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) {