summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-12-29 10:10:22 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2017-12-29 10:10:22 +0000
commit937120eca06c801303c3a257fc768749b7ee4f6b (patch)
tree1a6df4bfd1b9361e71698d2b4fedc98553983422
parentc5a396886fbfbfd785c3509e380bdd3f5e4496f0 (diff)
downloaddrakiso-937120eca06c801303c3a257fc768749b7ee4f6b.tar
drakiso-937120eca06c801303c3a257fc768749b7ee4f6b.tar.gz
drakiso-937120eca06c801303c3a257fc768749b7ee4f6b.tar.bz2
drakiso-937120eca06c801303c3a257fc768749b7ee4f6b.tar.xz
drakiso-937120eca06c801303c3a257fc768749b7ee4f6b.zip
drakclassic: ensure explicitly selected packages are not dropped.
If a package is implicitly selected, it may get dropped after the exclude lists have been processed. So if it appears in an include list, we must set it to class 1. Change WARNING to INFO for messages about already included/excluded packages.
-rw-r--r--lib/MGA/DrakISO/BuildMedia.pm13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/MGA/DrakISO/BuildMedia.pm b/lib/MGA/DrakISO/BuildMedia.pm
index 2455c03..2d38ca8 100644
--- a/lib/MGA/DrakISO/BuildMedia.pm
+++ b/lib/MGA/DrakISO/BuildMedia.pm
@@ -629,10 +629,13 @@ sub run_urpm {
sub add_to_selected_packages {
my ($source, $pkg, $class, $o_warn) = @_;
- if ($package_class{$pkg}) {
- print "WARNING <$source>: $pkg is already selected\n" if $o_warn;
+ if ($package_class{$pkg} == 1) {
+ print "INFO <$source>: $pkg is already explictly selected\n" if $o_warn;
+ } elsif ($package_class{$pkg} == 2) {
+ print "INFO <$source>: $pkg is already implictly selected\n" if $o_warn;
+ $package_class{$pkg} = $class;
} else {
- print "INFO: Selecting package $pkg\n" if $::verbose > 2;
+ print "INFO <$source>: Selecting package $pkg\n" if $::verbose > 2;
$package_class{$pkg} = $class;
}
}
@@ -641,10 +644,10 @@ sub remove_from_selected_packages {
my ($source, $pkg, $class, $o_warn) = @_;
if (defined $package_class{$pkg}) {
- print "INFO: Deselecting package $pkg\n" if $::verbose > 2;
+ print "INFO <$source>: Deselecting package $pkg\n" if $::verbose > 2;
delete $package_class{$pkg};
} else {
- print "WARNING <$source>: $pkg is not currently selected\n" if $o_warn;
+ print "INFO <$source>: $pkg is not currently selected\n" if $o_warn;
}
push @excluded_packages, $pkg;
}