summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-05-20 11:06:45 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-05-20 11:06:45 +0000
commit29f2d467a4893d09273857be674df55f1b645b0c (patch)
treefb49b79273070b01dc6e8d7a77531dc14a8d0439 /usr.sbin
parent58035180aed65b17a76092c0381c4a0f626514c1 (diff)
compute list of dependencies to adjust just-in-time.
This lets the pkg_add regress pass, finally.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Replace.pm4
-rw-r--r--usr.sbin/pkg_add/pkg_add6
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Replace.pm b/usr.sbin/pkg_add/OpenBSD/Replace.pm
index 394c08bf5e2..a31c48cec1e 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.15 2007/05/20 10:48:48 espie Exp $
+# $OpenBSD: Replace.pm,v 1.16 2007/05/20 11:06:44 espie Exp $
#
# Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org>
#
@@ -269,8 +269,6 @@ sub can_do
};
}
- $plist->{wantlist} = \@wantlist;
-
return $state->{okay} ? $plist : 0;
}
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index c5376a65467..d3ea78bd01c 100644
--- a/usr.sbin/pkg_add/pkg_add
+++ b/usr.sbin/pkg_add/pkg_add
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_add,v 1.254 2007/05/19 23:40:46 espie Exp $
+# $OpenBSD: pkg_add,v 1.255 2007/05/20 11:06:44 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -335,6 +335,9 @@ sub really_add($$)
thunderbird_special_case($plist);
}
require OpenBSD::Delete;
+ require OpenBSD::RequiredBy;
+ my @wantlist = OpenBSD::RequiredBy->new($op)->list;
+ $op->{wantlist} = \@wantlist;
try {
OpenBSD::Delete::delete_plist($op, $state);
} catchall {
@@ -436,7 +439,6 @@ sub really_add($$)
}
# and add dependencies corresponding to the replacement
for my $op (@toreplace) {
- require OpenBSD::RequiredBy;
require OpenBSD::Replace;
my $opkgname = $op->pkgname;