diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-11-11 13:54:49 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-11-11 13:54:49 +0000 |
commit | 09417875432928507405b11c7c7f6d5bbbc3204f (patch) | |
tree | 6ad8047f5e3364367edc154fa14466739361c0b2 /usr.sbin | |
parent | 3973b08694a9af323e4780766ebe2f88a06549aa (diff) |
oops, updatable is an object method, so $self is first parameter.
Mark @unexec /sbin/ldconfig -R and @unexec install-info --delete
as innocuous.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Update.pm | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm index 196cf1175d4..36527599b74 100644 --- a/usr.sbin/pkg_add/OpenBSD/Update.pm +++ b/usr.sbin/pkg_add/OpenBSD/Update.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Update.pm,v 1.23 2004/11/11 12:45:15 espie Exp $ +# $OpenBSD: Update.pm,v 1.24 2004/11/11 13:54:48 espie Exp $ # # Copyright (c) 2004 Marc Espie <espie@openbsd.org> # @@ -34,7 +34,7 @@ sub validate_depend { } -sub updatable($) { 1 } +sub updatable($$) { 1 } sub extract { @@ -109,19 +109,31 @@ sub extract } package OpenBSD::PackingElement::ScriptFile; -sub updatable($) { 0 } +sub updatable($$) { 0 } package OpenBSD::PackingElement::FINSTALL; -sub updatable($) { !$_[0] } +sub updatable($$) { !$_[1] } package OpenBSD::PackingElement::FDEINSTALL; -sub updatable($) { $_[0] } +sub updatable($$) { $_[1] } package OpenBSD::PackingElement::Exec; -sub updatable($) { !$_[0] } +sub updatable($$) { !$_[1] } package OpenBSD::PackingElement::Unexec; -sub updatable($) { $_[0] } +sub updatable($$) +{ + return 1 if $_[1]; + my $self = $_[0]; + + # those are deemed innocuous + if ($self->{expanded} =~ m|^/sbin/ldconfig\s+\-R\b| or + $self->{expanded} =~ m|^install-info\s+\-\-delete\b|) { + return 1; + } else { + return 0; + } +} package OpenBSD::PackingElement::LibDepend; use OpenBSD::Error; |