diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-01-03 11:40:59 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-01-03 11:40:59 +0000 |
commit | 569c82a8a35a5becc7f0f85fc396984c5a4ae85b (patch) | |
tree | 9f919303f33101c6e5085777d9ca4e943e8e2ca7 /lib/MGA/DrakISO | |
parent | 3481fae53f31389b1abe13b7b5b895d78e11abdb (diff) | |
download | drakiso-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/MGA/DrakISO')
-rw-r--r-- | lib/MGA/DrakISO/BuildMedia.pm | 6 |
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) ; } |