From 937120eca06c801303c3a257fc768749b7ee4f6b Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 29 Dec 2017 10:10:22 +0000 Subject: 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. --- lib/MGA/DrakISO/BuildMedia.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lib/MGA/DrakISO/BuildMedia.pm') 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; } -- cgit v1.2.1