summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-03-20 09:55:06 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-03-20 09:55:06 +0000
commit00ca6343c56e6f885229d08df29de34ba642cccc (patch)
tree006de5e6cbe44dfa6028785eb35e443728e9f36c /usr.sbin
parent95897942bf2b26e9393722b81911fc2eb22ca3f8 (diff)
if a package already contains an url marker (say, local stuff recreated),
don't override it. so that it can actually be installed.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Handle.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Handle.pm b/usr.sbin/pkg_add/OpenBSD/Handle.pm
index 2a1da8abf94..bb4f049bc9d 100644
--- a/usr.sbin/pkg_add/OpenBSD/Handle.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Handle.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Handle.pm,v 1.17 2009/12/31 13:48:52 espie Exp $
+# $OpenBSD: Handle.pm,v 1.18 2010/03/20 09:55:05 espie Exp $
#
# Copyright (c) 2007-2009 Marc Espie <espie@openbsd.org>
#
@@ -195,7 +195,9 @@ sub get_plist
$handle->set_error(BAD_PACKAGE);
return;
}
- OpenBSD::PackingElement::Url->add($plist, $location->url);
+ unless ($plist->has('url')) {
+ OpenBSD::PackingElement::Url->add($plist, $location->url);
+ }
if ($plist->localbase ne $state->{localbase}) {
$state->say("Localbase mismatch: package has: ", $plist->localbase, " , user wants: ", $state->{localbase});
$location->close_with_client_error;