diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-06-21 19:12:32 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-06-21 19:12:32 +0000 |
commit | 7ae9ba14f6961a559da694421e4dac1cfe41d76e (patch) | |
tree | 0f64d15e2aea4fce341578b6ad8f3b8efdd2b9cd /usr.sbin/pkg_add/OpenBSD/PackingList.pm | |
parent | df929491a8e29af71700cb3d2fad95304df97d81 (diff) |
move Arch->check() up to Packingelement, so that it can be called anywhere,
not only while adding packages.
Add FatOnly filter, which will be used to get information from packing-lists
to select the correct packing-list from a fat package (e.g., @arch and @name).
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingList.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingList.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm index 545e07d2405..62a6443209a 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.44 2004/12/16 11:19:59 espie Exp $ +# $OpenBSD: PackingList.pm,v 1.45 2005/06/21 19:12:31 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -158,6 +158,16 @@ sub ExtraInfoOnly } } +sub FatOnly +{ + my ($fh, $cont) = @_; + local $_; + while (<$fh>) { + next unless m/^\@(?:name\b|arch\b)/o; + &$cont($_); + } +} + sub ConflictOnly { my ($fh, $cont) = @_; |