diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-04-29 11:09:30 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-04-29 11:09:30 +0000 |
commit | 16ba533515400205c7877b0cff33d6e7d6f57ad1 (patch) | |
tree | 0d84df8b2d9251318c42383c2606a611e0263aff /usr.sbin/pkg_add/OpenBSD | |
parent | 21aa3452cd88d4bf64fcc6623307518ff82b5c87 (diff) |
replace $p->visit('method') calls with $p->method
now that it works.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Add.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Delete.pm | 6 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageLocator.pm | 8 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Replace.pm | 12 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/SharedItems.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/SharedLibs.pm | 8 |
6 files changed, 24 insertions, 18 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm index c2fda7e4a57..fafb859e5ec 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.51 2007/04/15 10:17:29 espie Exp $ +# $OpenBSD: Add.pm,v 1.52 2007/04/29 11:09:29 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -65,7 +65,7 @@ sub validate_plist($$) my $totsize = 0; my $colliding = []; - $plist->visit('validate', $state, \$problems, $colliding, \$totsize, $plist->pkgname()); + $plist->validate($state, \$problems, $colliding, \$totsize, $plist->pkgname()); if (@$colliding > 0) { require OpenBSD::CollisionReport; diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm index 87db9f6c2f3..fa12878a932 100644 --- a/usr.sbin/pkg_add/OpenBSD/Delete.pm +++ b/usr.sbin/pkg_add/OpenBSD/Delete.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Delete.pm,v 1.35 2007/04/15 10:17:29 espie Exp $ +# $OpenBSD: Delete.pm,v 1.36 2007/04/29 11:09:29 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -102,7 +102,7 @@ sub validate_plist($$) my $destdir = $state->{destdir}; $state->{problems} = 0; $state->{totsize} = 0; - $plist->visit('prepare_for_deletion', $state); + $plist->prepare_for_deletion($state); my $dir = installed_info($plist->pkgname()); for my $i (info_names()) { my $fname = $dir.$i; @@ -168,7 +168,7 @@ sub delete_plist if ($plist->has(DEINSTALL)) { $plist->get(DEINSTALL)->delete($state); } - $plist->visit('register_manpage', $state); + $plist->register_manpage($state); manpages_unindex($state); my $donesize = 0; for my $item (@{$plist->{groups}}, @{$plist->{users}}, @{$plist->{items}}) { diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm index d34d601548a..4323a7d998c 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageLocator.pm,v 1.55 2007/04/15 10:17:29 espie Exp $ +# $OpenBSD: PackageLocator.pm,v 1.56 2007/04/29 11:09:29 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -115,4 +115,10 @@ sub cleanup $pkgpath->cleanup(); } +sub match_spec +{ + my $self = shift; + return $pkgpath->match_spec(@_); +} + 1; diff --git a/usr.sbin/pkg_add/OpenBSD/Replace.pm b/usr.sbin/pkg_add/OpenBSD/Replace.pm index 928cc99f208..8a61ff5fb6c 100644 --- a/usr.sbin/pkg_add/OpenBSD/Replace.pm +++ b/usr.sbin/pkg_add/OpenBSD/Replace.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Replace.pm,v 1.4 2007/04/15 10:17:29 espie Exp $ +# $OpenBSD: Replace.pm,v 1.5 2007/04/29 11:09:29 espie Exp $ # # Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org> # @@ -256,7 +256,7 @@ sub can_do Fatal "Couldn't find packing-list for $toreplace\n"; } $state->{journal} = []; - $plist->visit('can_update', 0, $state); + $plist->can_update(0, $state); if ($state->{okay} == 0) { Warn "Old package ", $plist->pkgname(), " contains potentially unsafe operations\n"; for my $i (@{$state->{journal}}) { @@ -286,7 +286,7 @@ sub can_do if (!defined $p2) { Warn "Error: $wanting missing from installation\n" } else { - $p2->visit('validate_depend', $state, $wanting, + $p2->validate_depend($state, $wanting, $toreplace, $replacement); } } @@ -312,7 +312,7 @@ sub is_safe my ($plist, $state) = @_; $state->{okay} = 1; $state->{journal} = []; - $plist->visit('can_update', 1, $state); + $plist->can_update(1, $state); if ($state->{okay} == 0) { Warn "New package ", $plist->pkgname(), " contains potentially unsafe operations\n"; @@ -443,8 +443,8 @@ sub save_old_libraries print "Looking for changes in shared libraries\n" if $state->{beverbose}; - $old_plist->visit('mark_lib', $libs, $p); - $new_plist->visit('unmark_lib', $libs, $p); + $old_plist->mark_lib($libs, $p); + $new_plist->unmark_lib($libs, $p); if (%$libs) { print "Libraries to keep: ", join(",", sort(keys %$libs)), "\n" diff --git a/usr.sbin/pkg_add/OpenBSD/SharedItems.pm b/usr.sbin/pkg_add/OpenBSD/SharedItems.pm index 78cc36c5e31..080d8a3f51e 100644 --- a/usr.sbin/pkg_add/OpenBSD/SharedItems.pm +++ b/usr.sbin/pkg_add/OpenBSD/SharedItems.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: SharedItems.pm,v 1.7 2007/04/15 10:17:29 espie Exp $ +# $OpenBSD: SharedItems.pm,v 1.8 2007/04/29 11:09:29 espie Exp $ # # Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org> # @@ -35,7 +35,7 @@ sub find_items_in_installed_packages OpenBSD::ProgressMeter::show($done, $total); my $plist = OpenBSD::PackingList->from_installation($e, \&OpenBSD::PackingList::SharedItemsOnly) or next; - $plist->visit('record_shared_item', $e, $db); + $plist->record_shared_item($e, $db); $done++; } return $db; diff --git a/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm b/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm index c5d20943586..50ae3986769 100644 --- a/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm +++ b/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: SharedLibs.pm,v 1.9 2007/04/15 10:17:29 espie Exp $ +# $OpenBSD: SharedLibs.pm,v 1.10 2007/04/29 11:09:29 espie Exp $ # # Copyright (c) 2003-2005 Marc Espie <espie@openbsd.org> # @@ -146,7 +146,7 @@ sub add_package_libs } } - $plist->visit('mark_available_lib', $pkgname); + $plist->mark_available_lib($pkgname); } sub add_bogus_package_libs @@ -162,7 +162,7 @@ sub add_bogus_package_libs Warn "Can't read plist for $pkgname\n"; return; } - $plist->visit('mark_bogus_lib', $pkgname); + $plist->mark_bogus_lib($pkgname); } sub add_plist_libs @@ -171,7 +171,7 @@ sub add_plist_libs my $pkgname = $plist->pkgname(); return if $done_plist->{$pkgname}; $done_plist->{$pkgname} = 1; - $plist->visit('mark_available_lib', $pkgname); + $plist->mark_available_lib($pkgname); } sub _lookup_libspec |