summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-05-22 11:02:58 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-05-22 11:02:58 +0000
commitfb032318a854417c2370bccb0b24789112055093 (patch)
treef884e1b1c97a9b11f6eee5dca2c8f00428d98162 /usr.sbin
parent5d2c4b4e0002177a7b90fd29b3f68d77a682dea4 (diff)
zap references to pkgdep. Packing-Lists no longer even record it, anyways.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Add.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Delete.pm18
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Replace.pm25
-rw-r--r--usr.sbin/pkg_add/pkg_create.119
4 files changed, 5 insertions, 60 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm
index ff479213cf4..a7cd0a9a9e2 100644
--- a/usr.sbin/pkg_add/OpenBSD/Add.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Add.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Add.pm,v 1.53 2007/05/02 15:05:29 espie Exp $
+# $OpenBSD: Add.pm,v 1.54 2007/05/22 11:02:57 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -112,7 +112,6 @@ sub borked_installation
OpenBSD::PackingElement::Cwd->add($plist, '.');
my $pkgname = $plist->pkgname;
$plist->{name}->{name} = $borked;
- $plist->{pkgdep} = [];
my $dest = installed_info($borked);
register_installation($dir, $dest, $plist);
Fatal @msg, ", partial installation recorded as $borked";
diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm
index 569d0384fa1..f388ebbe673 100644
--- a/usr.sbin/pkg_add/OpenBSD/Delete.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Delete.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Delete.pm,v 1.45 2007/05/22 10:11:59 espie Exp $
+# $OpenBSD: Delete.pm,v 1.46 2007/05/22 11:02:57 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -191,13 +191,7 @@ sub delete_plist
$plist->get(UNDISPLAY)->prepare($state);
}
- # guard against duplicate pkgdep
- my $removed = {};
-
- my $zap_dependency = sub {
- my $name = shift;
-
- return if defined $removed->{$name};
+ for my $name (OpenBSD::Requiring->new($pkgname)->list) {
print "remove dependency on $name\n"
if $state->{very_verbose} or $state->{not};
local $@;
@@ -206,14 +200,6 @@ sub delete_plist
} catchall {
print STDERR "$_\n";
};
- $removed->{$name} = 1;
- };
-
- for my $item (@{$plist->{pkgdep}}) {
- &$zap_dependency($item->{name});
- }
- for my $name (OpenBSD::Requiring->new($pkgname)->list) {
- &$zap_dependency($name);
}
return if $state->{not};
diff --git a/usr.sbin/pkg_add/OpenBSD/Replace.pm b/usr.sbin/pkg_add/OpenBSD/Replace.pm
index a31c48cec1e..65e8063e5dc 100644
--- a/usr.sbin/pkg_add/OpenBSD/Replace.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Replace.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Replace.pm,v 1.16 2007/05/20 11:06:44 espie Exp $
+# $OpenBSD: Replace.pm,v 1.17 2007/05/22 11:02:57 espie Exp $
#
# Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org>
#
@@ -336,23 +336,6 @@ sub split_libs
return $splitted;
}
-sub convert_to_requiring
-{
- my $pkg = shift;
-
- my $plist = OpenBSD::PackingList->from_installation($pkg);
- if (!defined $plist) {
- Warn "Couldn't read plist for $pkg\n";
- return;
- }
- my $r = OpenBSD::Requiring->new($pkg);
- for my $item (@{$plist->{pkgdep}}) {
- $r->add($item->{name});
- }
- delete $plist->{pkgdep};
- $plist->to_installation;
-}
-
sub walk_depends_closure
{
my ($start, $plist, $state) = @_;
@@ -375,9 +358,6 @@ sub walk_depends_closure
$done->{$pkg2} = 1;
$write->add($pkg2);
my $l = OpenBSD::Requiring->new($pkg2);
- if (!$l->list) {
- convert_to_requiring($pkg2);
- }
$l->add($name);
$depend = 1;
}
@@ -448,9 +428,6 @@ sub adjust_dependency
my ($dep, $from, $into) = @_;
my $l = OpenBSD::Requiring->new($dep);
- if (!$l->list) {
- convert_to_requiring($dep);
- }
$l->delete($from);
$l->add($into);
}
diff --git a/usr.sbin/pkg_add/pkg_create.1 b/usr.sbin/pkg_add/pkg_create.1
index 3788f9445c2..94ccc026287 100644
--- a/usr.sbin/pkg_add/pkg_create.1
+++ b/usr.sbin/pkg_add/pkg_create.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pkg_create.1,v 1.36 2007/05/22 00:25:42 espie Exp $
+.\" $OpenBSD: pkg_create.1,v 1.37 2007/05/22 11:02:57 espie Exp $
.\"
.\" Documentation and design originally from FreeBSD. All the code has
.\" been rewritten since. We keep the documentation's notice:
@@ -568,23 +568,6 @@ Deprecated, use
.Cm @conflict
instead.
.Pp
-.It Cm @pkgdep Ar pkgname
-Declare a dependency on the
-.Ar pkgname
-package.
-The
-.Ar pkgname
-package must be installed before this package may be
-installed, and this package must be deinstalled before the
-.Ar pkgname
-package is deinstalled.
-Multiple
-.Cm @pkgdep
-directives may be used if the package depends on multiple other packages.
-Deprecated, use
-.Cm @depend
-instead.
-.Pp
.It Cm @pkgpath Ar pkgpath
Declare an extra
.Ar pkgpath