From 569c82a8a35a5becc7f0f85fc396984c5a4ae85b Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Wed, 3 Jan 2018 11:40:59 +0000 Subject: drakclassic: support simple wildcards (? and *) in package lists. --- lib/MGA/DrakISO/BuildMedia.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/MGA/DrakISO/BuildMedia.pm b/lib/MGA/DrakISO/BuildMedia.pm index 9ed9026..c1472c8 100644 --- a/lib/MGA/DrakISO/BuildMedia.pm +++ b/lib/MGA/DrakISO/BuildMedia.pm @@ -682,10 +682,12 @@ sub update_package_selection { foreach my $alternative (@alternatives) { $action->($file, $alternative, $class); } - } elsif ($pkg =~ /-$/) { + } elsif ($pkg =~ /[?*]/) { print " expanding package $pkg\n" if $::verbose > 1; + $pkg =~ s/\?/.?/g; + $pkg =~ s/\*/.*/g; my $available_list = $build->get_builddir('tmp') . '/pkg-available.lst'; - my @candidates = split('\n', `LC_ALL=C grep '^$pkg' $available_list`); + my @candidates = split('\n', `LC_ALL=C grep '^$pkg\$' $available_list`); foreach (@candidates) { $action->($file, $_, $class) ; } -- cgit v1.2.1