summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-01-03 11:40:59 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-01-03 11:40:59 +0000
commit569c82a8a35a5becc7f0f85fc396984c5a4ae85b (patch)
tree9f919303f33101c6e5085777d9ca4e943e8e2ca7 /lib
parent3481fae53f31389b1abe13b7b5b895d78e11abdb (diff)
downloaddrakiso-569c82a8a35a5becc7f0f85fc396984c5a4ae85b.tar
drakiso-569c82a8a35a5becc7f0f85fc396984c5a4ae85b.tar.gz
drakiso-569c82a8a35a5becc7f0f85fc396984c5a4ae85b.tar.bz2
drakiso-569c82a8a35a5becc7f0f85fc396984c5a4ae85b.tar.xz
drakiso-569c82a8a35a5becc7f0f85fc396984c5a4ae85b.zip
drakclassic: support simple wildcards (? and *) in package lists.
Diffstat (limited to 'lib')
-rw-r--r--lib/MGA/DrakISO/BuildMedia.pm6
1 files changed, 4 insertions, 2 deletions
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) ;
}