summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2014-01-31 10:29:55 +0000
committerMarc Espie <espie@cvs.openbsd.org>2014-01-31 10:29:55 +0000
commit68008a61fa7864ca3079d3be69c8fdc30b05aff7 (patch)
treec4b45c643aff75dd62ed7e8af498a0940e9326ff /usr.sbin/pkg_add
parentee4d6dd22844efb4bb018e371263db07310abbd7 (diff)
minor fix: don't go to cache if genuine install
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Add.pm17
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgAdd.pm3
2 files changed, 11 insertions, 9 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm
index bfb02ee63d1..fb5e0185de3 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.144 2014/01/30 13:12:50 espie Exp $
+# $OpenBSD: Add.pm,v 1.145 2014/01/31 10:29:54 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -52,12 +52,15 @@ sub manpages_index
sub register_installation
{
my ($plist, $state) = @_;
- return if $state->{not};
- my $dest = installed_info($plist->pkgname);
- mkdir($dest);
- $plist->copy_info($dest, $state);
- $plist->set_infodir($dest);
- $plist->to_installation;
+ if ($state->{not}) {
+ $plist->to_cache;
+ } else {
+ my $dest = installed_info($plist->pkgname);
+ mkdir($dest);
+ $plist->copy_info($dest, $state);
+ $plist->set_infodir($dest);
+ $plist->to_installation;
+ }
}
sub validate_plist
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
index 78ef79cbbca..b4e8e204d55 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.48 2014/01/30 13:12:50 espie Exp $
+# $OpenBSD: PkgAdd.pm,v 1.49 2014/01/31 10:29:54 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -796,7 +796,6 @@ sub really_add
my $plist = $handle->plist;
OpenBSD::SharedLibs::add_libs_from_plist($plist, $state);
OpenBSD::Add::tweak_plist_status($plist, $state);
- $plist->to_cache;
OpenBSD::Add::register_installation($plist, $state);
add_installed($pkgname);
delete $handle->{partial};