From 8c9d39a306efc9cea5a66ecb8edfe0565ddfe719 Mon Sep 17 00:00:00 2001 From: espie Date: Tue, 30 Dec 2008 13:28:20 +0000 Subject: [PATCH] cheat a bit when registering comments... --- infrastructure/install/make-plist | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/infrastructure/install/make-plist b/infrastructure/install/make-plist index 7daca417c6c..ffe669f3827 100755 --- a/infrastructure/install/make-plist +++ b/infrastructure/install/make-plist @@ -1,5 +1,5 @@ #! /usr/bin/perl -# $OpenBSD: make-plist,v 1.141 2008/12/27 12:44:02 espie Exp $ +# $OpenBSD: make-plist,v 1.142 2008/12/30 13:28:20 espie Exp $ # Copyright (c) 2004-2008 Marc Espie # # Permission to use, copy, modify, and distribute this software for any @@ -552,12 +552,11 @@ sub cwd return ${$self->{cwd}}; } -sub add_to_haystack +sub add_this_name_to_haystack { - my ($self, $plist, $haystack) = @_; + my ($self, $name, $haystack) = @_; - $self->SUPER::add_to_haystack($plist, $haystack); - my $fullname = File::Spec->canonpath($self->{name}); + my $fullname = File::Spec->canonpath($name); if ($fullname !~ m|^/|o && $self->cwd ne '.') { $fullname = $self->cwd."/".$fullname; } @@ -565,6 +564,17 @@ sub add_to_haystack push(@{$haystack->{$n}}, $self); } +sub add_to_haystack +{ + my ($self, $plist, $haystack) = @_; + + $self->SUPER::add_to_haystack($plist, $haystack); + $self->add_this_name_to_haystack($self->{name}, $haystack); + if ($self->{name} =~ m/^\@\S+\s*(.*)$/o) { + $self->add_this_name_to_haystack($1, $haystack); + } +} + sub copy_annotations { } @@ -692,7 +702,7 @@ sub create_object my ($type, $short, $item) = @_; if (defined $item && $item->isa("OpenBSD::PackingElement::Comment")) { - return OpenBSD::PackingElement::Comment->new($short); + return $item->clone; } if ($type eq "directory") { if (defined $item) { @@ -861,7 +871,6 @@ sub handle_file my ($file, $haystack, $allplists, $shared_only) = @_; my $foundit; - my $default = $allplists->[0]; if (defined $haystack->{$file->path}) { for my $item (@{$haystack->{$file->path}}) { next if $item->isa("OpenBSD::PackingElement::State"); @@ -927,6 +936,7 @@ sub handle_file my $short; my $p; + my $default = $allplists->[0]; my $possible = possible_subpackages($file->path); if (@$possible == 0) {