From 7ae9ba14f6961a559da694421e4dac1cfe41d76e Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Tue, 21 Jun 2005 19:12:32 +0000 Subject: 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). --- usr.sbin/pkg_add/OpenBSD/PackingList.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'usr.sbin/pkg_add/OpenBSD/PackingList.pm') 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 # @@ -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) = @_; -- cgit v1.2.3