diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | lib/MGA/DrakISO/BuildMedia.pm | 17 |
2 files changed, 7 insertions, 12 deletions
@@ -1,3 +1,5 @@ +- improved algorithm for selecting packages from rpmsrate + 1.18 - change ESP label to MGAISO-ESP (mga#28409) diff --git a/lib/MGA/DrakISO/BuildMedia.pm b/lib/MGA/DrakISO/BuildMedia.pm index 8f2717a..8d589b4 100644 --- a/lib/MGA/DrakISO/BuildMedia.pm +++ b/lib/MGA/DrakISO/BuildMedia.pm @@ -325,23 +325,16 @@ sub add_rated_packages { my ($ratings, $flag_expressions) = partition { /^\d$/ } @values; my ($rating) = @$ratings or die "ERROR: missing rating at $file line $line_number\n"; - # In the installer, the set of flag expressions is treated as a - # list of conditions, all of which must be true for the package - # to be selected. But we need to include the packages for any - # possible selection of categories, so we need to determine - # whether any individual flag matches one of groups specified by - # the user and whether the package rating meets the specified - # threshold for that group. - my @flags = map { split('\|\|', $_) } @$flag_expressions; - # Skip any architecture-specific packages that don't match our # architecture. my $arch = $build->{settings}{arch}; - next if $arch eq 'x86_64' && member('!TYPE"64bit"', @flags); - next if $arch ne 'x86_64' && member( 'TYPE"64bit"', @flags); + next if $arch eq 'x86_64' && member('!TYPE"64bit"', @$flag_expressions); + next if $arch ne 'x86_64' && member( 'TYPE"64bit"', @$flag_expressions); # Skip any packages that don't match the user's requirements. - next if !any { defined $group_threshold{$_} && $rating >= $group_threshold{$_} } @flags; + next if any { + !any { $_ =~ /^!/ || !defined $group_threshold{$_} || $rating >= $group_threshold{$_} } split('\|\|', $_) + } @$flag_expressions; # For each package, set the package class to 1 to indicate it is # an explicitly selected package. |