summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2013-12-08 12:14:42 +0000
committerMarc Espie <espie@cvs.openbsd.org>2013-12-08 12:14:42 +0000
commitc6559b87f49b67d161e82beae245d1e9fc5ab280 (patch)
treeb906ff655824a501bd068b4192d131153e3616ce /usr.sbin/pkg_add/OpenBSD
parent4a95f715d40f2a17a4e5fcb0532963474981cddb (diff)
also cover initial installations (which means we do try to install
quirks even for initial installations)
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/AddDelete.pm10
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Handle.pm6
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgAdd.pm6
3 files changed, 15 insertions, 7 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
index e8fcb0393b0..703c8d1f75e 100644
--- a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
+++ b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: AddDelete.pm,v 1.54 2012/07/06 12:02:50 espie Exp $
+# $OpenBSD: AddDelete.pm,v 1.55 2013/12/08 12:14:41 espie Exp $
#
# Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org>
#
@@ -318,7 +318,13 @@ sub choose_location
{
my ($state, $name, $list, $is_quirks) = @_;
if (@$list == 0) {
- $state->errsay("Can't find #1", $name) unless $is_quirks;
+ if (!$is_quirks) {
+ $state->errsay("Can't find #1", $name);
+ eval {
+ my $r = [$name];
+ $state->quirks->filter_obsolete($r, $state);
+ }
+ }
return undef;
} elsif (@$list == 1) {
return $list->[0];
diff --git a/usr.sbin/pkg_add/OpenBSD/Handle.pm b/usr.sbin/pkg_add/OpenBSD/Handle.pm
index 2a8cfb83b19..67a7d2b51e3 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.30 2012/04/28 11:53:53 espie Exp $
+# $OpenBSD: Handle.pm,v 1.31 2013/12/08 12:14:41 espie Exp $
#
# Copyright (c) 2007-2009 Marc Espie <espie@openbsd.org>
#
@@ -240,6 +240,10 @@ sub get_location
$state);
if (!$handle->{tweaked}) {
$state->say("Can't find #1", $name);
+ eval {
+ my $r = [$name];
+ $state->quirks->filter_obsolete($r, $state);
+ }
}
return;
}
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
index 5b97e298c5a..ab949571d70 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgAdd.pm,v 1.36 2013/12/08 12:04:13 espie Exp $
+# $OpenBSD: PkgAdd.pm,v 1.37 2013/12/08 12:14:41 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -1129,9 +1129,7 @@ sub main
my ($self, $state) = @_;
$state->progress->set_header('');
- if ($state->{allow_replacing}) {
- $self->do_quirks($state);
- }
+ $self->do_quirks($state);
$self->process_setlist($state);
}