From 1dd6f0318ed85d5573a5aef4b5556ff923d31383 Mon Sep 17 00:00:00 2001 From: espie Date: Wed, 6 Apr 2022 14:15:27 +0000 Subject: [PATCH] - document where dependency tree is built - remove future code that was never used. - reformat --- usr.sbin/pkg_add/OpenBSD/PkgAdd.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm index f4a875998bf..8e0222e269f 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.124 2022/03/13 14:39:56 espie Exp $ +# $OpenBSD: PkgAdd.pm,v 1.125 2022/04/06 14:15:27 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -655,6 +655,8 @@ sub partial_install return failed_message($base_msg, $state->{received}, save_partial_set($set, $state)); } +# quick sub to build the dependency arcs for older packages +# newer packages are handled by Dependencies.pm sub build_before { my %known = map {($_->pkgname, 1)} @_; @@ -765,9 +767,6 @@ sub really_add $replacing = 1; } $state->{replacing} = $replacing; - # XXX placeholder for optimization - $state->{simple_update} = 0; - #$state->{simple_update} = $set->{simple_update}; my $handler = sub { $state->{received} = shift; @@ -918,7 +917,8 @@ sub newer_is_bad_arch sub may_tie_files { my ($set, $state) = @_; - if ($set->newer > 0 && $set->older_to_do > 0 && !$state->defines('donttie')) { + if ($set->newer > 0 && $set->older_to_do > 0 && + !$state->defines('donttie')) { my $sha = {}; for my $o ($set->older_to_do) { -- 2.20.1