summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2012-12-28 15:09:09 +0000
committerespie <espie@openbsd.org>2012-12-28 15:09:09 +0000
commitf0c4f0f99c433361949c37e50bcee747e57de024 (patch)
tree55c3a412c117c6808d72b8aa18f9dc8cd960c366
parentAvoid spinning in the cleaner when there are insufficient clean pages, but (diff)
downloadwireguard-openbsd-f0c4f0f99c433361949c37e50bcee747e57de024.tar.xz
wireguard-openbsd-f0c4f0f99c433361949c37e50bcee747e57de024.zip
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).
-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;