summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2005-09-04 22:53:52 +0000
committerMarc Espie <espie@cvs.openbsd.org>2005-09-04 22:53:52 +0000
commitfd311cf2f2be1b57301856ad9430c95537e7ab01 (patch)
tree8a71343a5787be89e818d3d2b56de82a2f961ab8 /usr.sbin/pkg_add
parent2491e24fbcb5bf7f102559b04685505a55540a40 (diff)
zap duplicate code
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Add.pm13
-rw-r--r--usr.sbin/pkg_add/pkg_add6
2 files changed, 4 insertions, 15 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm
index caa3c10715f..2b95a746ddf 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.40 2005/09/04 22:47:56 espie Exp $
+# $OpenBSD: Add.pm,v 1.41 2005/09/04 22:53:51 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -23,17 +23,6 @@ use OpenBSD::PackageInfo;
use OpenBSD::ArcCheck;
use File::Copy;
-sub is_needed
-{
- my ($plist, $state) = @_;
- my $oplist = OpenBSD::PackingList->from_installation($plist->pkgname());
- my $n = $plist->signature();
- my $o = $oplist->signature();
- print "Comparing full signature for ", $plist->pkgname(), " \"$o\" vs. \"$n\": ", $n eq $o ? "equal\n" : "different\n"
- if $state->{very_verbose};
- return $n ne $o;
-}
-
sub manpages_index
{
my ($state) = @_;
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index de0e98d4dcf..b933eade4e0 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.197 2005/09/04 22:47:56 espie Exp $
+# $OpenBSD: pkg_add,v 1.198 2005/09/04 22:53:51 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -63,7 +63,7 @@ sub can_install($$$)
my %conflicts = map {($_,1)} @conflicts;
if ((keys %conflicts) == 1 && (keys %conflicts)[0] eq $pkgname) {
- if (!OpenBSD::Add::is_needed($plist, $state)) {
+ if (!has_new_sig($plist, $state)) {
print "Already installed: $pkgname\n";
return 1;
}
@@ -527,7 +527,7 @@ sub install_package
if (is_installed($plist->pkgname()) && !$state->{forced}->{installed}) {
if ($state->{replace}) {
- if (!OpenBSD::Add::is_needed($plist, $state)) {
+ if (!has_new_sig($plist, $state)) {
OpenBSD::SharedLibs::add_package_libs($plist->pkgname());
$state->{installed}->{$handle->{pkgname}} = 1;
$handle->close();