diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-09-14 22:28:24 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-09-14 22:28:24 +0000 |
commit | b0be2c8c2025a6a6ac4e583577633f3e094b362c (patch) | |
tree | 641035f69b68af231cebe3eab254f297e7675ef5 /usr.sbin/pkg_add | |
parent | 710c98d2befbed63a9ed06f7997b668dec9fb74f (diff) |
new categories, modules and manual-installation, not active yet.
new visit method, to do anything on a packing-list.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingList.pm | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm index bb650a2dff5..54b6db2d42f 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.21 2004/08/06 10:23:45 espie Exp $ +# $OpenBSD: PackingList.pm,v 1.22 2004/09/14 22:28:23 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -120,10 +120,10 @@ sub write $item->write($fh); } } - for my $unique_item (qw(name no-default-conflict extrainfo arch)) { + for my $unique_item (qw(name no-default-conflict manual-installation extrainfo arch)) { $self->{$unique_item}->write($fh) if defined $self->{$unique_item}; } - for my $listname (qw(pkgcfl pkgdep newdepend libdepend items)) { + for my $listname (qw(modules pkgcfl pkgdep newdepend libdepend items)) { if (defined $self->{$listname}) { for my $item (@{$self->{$listname}}) { $item->write($fh); @@ -135,6 +135,35 @@ sub write } } +sub visit +{ + my ($self, $method, @l) = @_; + + if (defined $self->{cvstags}) { + for my $item (@{$self->{cvstags}}) { + $item->$method(@l); + } + } + + for my $special (OpenBSD::PackageInfo::info_names()) { + $self->{$special}->$method(@l, 0) if defined $self->{$special}; + } + + for my $unique_item (qw(name no-default-conflict manual-installation extrainfo arch)) { + $self->{$unique_item}->$method(@l) if defined $self->{$unique_item}; + } + for my $listname (qw(modules pkgcfl pkgdep newdepend libdepend items)) { + if (defined $self->{$listname}) { + for my $item (@{$self->{$listname}}) { + $item->$method(@l); + } + } + } + for my $special (OpenBSD::PackageInfo::info_names()) { + $self->{$special}->$method(@l, 1) if defined $self->{$special}; + } +} + sub fromfile { my ($a, $fname, $code) = @_; |