summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2012-12-28 15:09:10 +0000
committerMarc Espie <espie@cvs.openbsd.org>2012-12-28 15:09:10 +0000
commit0f802021192271d749cddd44c13880fc64a6c342 (patch)
tree802f9ec5f459075539733e6d6d13d55ab6333488 /usr.sbin/pkg_add/OpenBSD
parent6f7a3f8e917f0ca577a2ff6901a511c6c4085553 (diff)
base on landry's remarks, stuff like .libs* and partial* shouldn't ever
have manual annotation markers. (the read part is there for legacy, as some stuff is already written back that way. Eventually, no .libs* will have @option manual-install left).
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingList.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm
index 44fc60510a4..998d065c62c 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackingList.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackingList.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackingList.pm,v 1.120 2012/06/08 15:01:00 espie Exp $
+# $OpenBSD: PackingList.pm,v 1.121 2012/12/28 15:09:09 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -135,6 +135,15 @@ sub infodir
return ${$self->{infodir}};
}
+sub zap_wrong_annotations
+{
+ my $self = shift;
+ my $pkgname = $self->pkgname;
+ if (defined $pkgname && $pkgname =~ m/^(?:\.libs\d*|partial)\-/) {
+ delete $self->{'manual-installation'};
+ }
+}
+
sub conflict_list
{
require OpenBSD::PkgCfl;
@@ -161,6 +170,7 @@ sub read
return if $line =~ m/^\s*$/o;
OpenBSD::PackingElement->create($line, $plist);
});
+ $plist->zap_wrong_annotations;
return $plist;
}
@@ -303,6 +313,7 @@ sub tofile
{
my ($self, $fname) = @_;
open(my $fh, '>', $fname) or return;
+ $self->zap_wrong_annotations;
$self->write($fh);
close($fh) or return;
return 1;