summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/Update.pm
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/Update.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Update.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm
index 71edc223357..75961b99792 100644
--- a/usr.sbin/pkg_add/OpenBSD/Update.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Update.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Update.pm,v 1.32 2004/11/14 19:25:45 espie Exp $
+# $OpenBSD: Update.pm,v 1.33 2004/11/18 21:48:02 espie Exp $
#
# Copyright (c) 2004 Marc Espie <espie@openbsd.org>
#
@@ -189,6 +189,20 @@ sub validate_depend
}
}
+package OpenBSD::PackingElement::Dependency;
+use OpenBSD::Error;
+
+sub validate_depend
+{
+ my ($self, $state, $wanting, $toreplace, $replacement) = @_;
+
+ return unless OpenBSD::PkgSpec::match($self->{pattern}, $toreplace);
+ if (!OpenBSD::PkgSpec::match($self->{pattern}, $replacement)) {
+ $state->{okay} = 0;
+ Warn "Can't update forward dependency of $wanting on $toreplace\n";
+ }
+}
+
package OpenBSD::Update;
use OpenBSD::RequiredBy;
use OpenBSD::PackingList;