Hello community, here is the log from the commit of package yast2-packager for openSUSE:Factory checked in at 2018-01-28 00:38:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old) and /work/SRC/openSUSE:Factory/.yast2-packager.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-packager" Sun Jan 28 00:38:15 2018 rev:340 rq:569854 version:4.0.32 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes 2018-01-17 21:44:25.946181192 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes 2018-01-28 00:38:16.808719781 +0100 @@ -1,0 +2,21 @@ +Fri Jan 26 12:32:28 UTC 2018 - [email protected] + +- Display a correct product license and release notes at upgrade + from SLE12, correctly filter out the old installed products + (fate#1076513) +- 4.0.32 + +------------------------------------------------------------------- +Fri Jan 26 11:09:11 UTC 2018 - [email protected] + +- Hot fix for big memory consumption during NET installer with + whole TW repo (bsc#1076768) +- 4.0.31 + +------------------------------------------------------------------- +Tue Jan 23 11:19:28 UTC 2018 - [email protected] + +- Do not display the license again when going back (bsc#1069124) +- 4.0.30 + +------------------------------------------------------------------- Old: ---- yast2-packager-4.0.29.tar.bz2 New: ---- yast2-packager-4.0.32.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-packager.spec ++++++ --- /var/tmp/diff_new_pack.MrLJNQ/_old 2018-01-28 00:38:17.348694626 +0100 +++ /var/tmp/diff_new_pack.MrLJNQ/_new 2018-01-28 00:38:17.352694439 +0100 @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.0.29 +Version: 4.0.32 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-packager-4.0.29.tar.bz2 -> yast2-packager-4.0.32.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.29/package/yast2-packager.changes new/yast2-packager-4.0.32/package/yast2-packager.changes --- old/yast2-packager-4.0.29/package/yast2-packager.changes 2018-01-17 14:25:09.000000000 +0100 +++ new/yast2-packager-4.0.32/package/yast2-packager.changes 2018-01-26 13:55:01.000000000 +0100 @@ -1,4 +1,25 @@ ------------------------------------------------------------------- +Fri Jan 26 12:32:28 UTC 2018 - [email protected] + +- Display a correct product license and release notes at upgrade + from SLE12, correctly filter out the old installed products + (fate#1076513) +- 4.0.32 + +------------------------------------------------------------------- +Fri Jan 26 11:09:11 UTC 2018 - [email protected] + +- Hot fix for big memory consumption during NET installer with + whole TW repo (bsc#1076768) +- 4.0.31 + +------------------------------------------------------------------- +Tue Jan 23 11:19:28 UTC 2018 - [email protected] + +- Do not display the license again when going back (bsc#1069124) +- 4.0.30 + +------------------------------------------------------------------- Wed Jan 17 13:07:52 UTC 2018 - [email protected] - Added a new client for displaying the product license at upgrade diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.29/package/yast2-packager.spec new/yast2-packager-4.0.32/package/yast2-packager.spec --- old/yast2-packager-4.0.29/package/yast2-packager.spec 2018-01-17 14:25:09.000000000 +0100 +++ new/yast2-packager-4.0.32/package/yast2-packager.spec 2018-01-26 13:55:01.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.0.29 +Version: 4.0.32 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.29/src/lib/y2packager/clients/inst_product_upgrade_license.rb new/yast2-packager-4.0.32/src/lib/y2packager/clients/inst_product_upgrade_license.rb --- old/yast2-packager-4.0.29/src/lib/y2packager/clients/inst_product_upgrade_license.rb 2018-01-17 14:25:09.000000000 +0100 +++ new/yast2-packager-4.0.32/src/lib/y2packager/clients/inst_product_upgrade_license.rb 2018-01-26 13:55:01.000000000 +0100 @@ -17,6 +17,7 @@ Yast.import "Pkg" Yast.import "Report" +Yast.import "GetInstArgs" module Y2Packager module Clients @@ -24,11 +25,15 @@ # # The client will display an error and return :back if not product is found. # If no license is found for the selected product it returns :auto. + # The license is not displayed when going back in the workflow. # @see Y2Packager::Clients::InstProductLicense class InstProductUpgradeLicense < InstProductLicense def main textdomain "installation" + # do not display the license when going back, skip the dialog + return :back if Yast::GetInstArgs.going_back + if !product # TRANSLATORS: An error message, the package solver could not find # any product to upgrade in the selected partition. @@ -39,6 +44,8 @@ return :auto unless available_license? + log.info "Displaying license for product: #{product.inspect}" + Y2Packager::Dialogs::InstProductLicense.new(product).run end @@ -57,6 +64,11 @@ @product = Y2Packager::Product.selected_base # restore the initial status, the package update will be turned on later again Yast::Pkg.PkgReset + changed = Yast::Pkg.ResolvableProperties("", :package, "").select do |p| + p["status"] != :available || p["status"] != :installed + end + changed.each { |p| Yast::Pkg.PkgNeutral(p["name"]) } + @product end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.29/src/lib/y2packager/product_reader.rb new/yast2-packager-4.0.32/src/lib/y2packager/product_reader.rb --- old/yast2-packager-4.0.29/src/lib/y2packager/product_reader.rb 2018-01-17 14:25:09.000000000 +0100 +++ new/yast2-packager-4.0.32/src/lib/y2packager/product_reader.rb 2018-01-26 13:55:01.000000000 +0100 @@ -108,11 +108,14 @@ def available_products products = Yast::Pkg.ResolvableProperties("", :product, "") + # remove e.g. installed products + products.select! { |p| p["status"] == :available || p["status"] == :selected } + # remove duplicates, there migth be different flavors ("DVD"/"POOL") # or archs (x86_64/i586), when selecting the product to install later # libzypp will select the correct arch automatically - products.uniq! { |prod| prod["name"] } - log.info "Found products: #{products.map { |prod| prod["name"] }}" + products.uniq! { |p| "#{p["name"]}__#{p["version"]}" } + log.info "Found products: #{products.map { |p| p["name"] }}" products end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.29/src/modules/Packages.rb new/yast2-packager-4.0.32/src/modules/Packages.rb --- old/yast2-packager-4.0.29/src/modules/Packages.rb 2018-01-17 14:25:09.000000000 +0100 +++ new/yast2-packager-4.0.32/src/modules/Packages.rb 2018-01-26 13:55:01.000000000 +0100 @@ -2411,7 +2411,8 @@ def log_software_selection log.info "-" * 10 << " Transaction Status Begin " << "-" * 10 - RESOLVABLE_TYPES.each do |type| + # we do not log packages as it can be increase significantly memory usage (see bsc#1076768) + [:product, :pattern].each do |type| resolvables = Pkg.ResolvableProperties("", type, "") resolvables.select! { |r| LOG_RESOLVABLE_TRANSACT_BY.include? r["transact_by"] } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.29/test/lib/clients/inst_product_upgrade_license_test.rb new/yast2-packager-4.0.32/test/lib/clients/inst_product_upgrade_license_test.rb --- old/yast2-packager-4.0.29/test/lib/clients/inst_product_upgrade_license_test.rb 2018-01-17 14:25:09.000000000 +0100 +++ new/yast2-packager-4.0.32/test/lib/clients/inst_product_upgrade_license_test.rb 2018-01-26 13:55:01.000000000 +0100 @@ -6,10 +6,28 @@ describe Y2Packager::Clients::InstProductUpgradeLicense do describe "#main" do before do - expect(Yast::Pkg).to receive(:PkgUpdateAll) - expect(Yast::Pkg).to receive(:PkgReset) + allow(Yast::Pkg).to receive(:PkgUpdateAll) + allow(Yast::Pkg).to receive(:PkgReset) allow(Y2Packager::Product).to receive(:selected_base).and_return(product) allow(Yast::Report).to receive(:Error) + allow(Yast::GetInstArgs).to receive(:going_back).and_return(false) + end + + context "going back in the workflow" do + let(:product) { nil } + + before do + expect(Yast::GetInstArgs).to receive(:going_back).and_return(true) + end + + it "returns :back" do + expect(subject.main).to eq(:back) + end + + it "does not display the license" do + expect_any_instance_of(Y2Packager::Dialogs::InstProductLicense).to_not receive(:run) + subject.main + end end context "no product found" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.29/test/product_reader_test.rb new/yast2-packager-4.0.32/test/product_reader_test.rb --- old/yast2-packager-4.0.29/test/product_reader_test.rb 2018-01-17 14:25:09.000000000 +0100 +++ new/yast2-packager-4.0.32/test/product_reader_test.rb 2018-01-26 13:55:01.000000000 +0100 @@ -61,8 +61,8 @@ context "when no product with system-installation() tag exists" do let(:installation_package_map) { {} } - let(:prod1) { { "name" => "SLES" } } - let(:prod2) { { "name" => "SLED" } } + let(:prod1) { { "name" => "SLES", "status" => :available } } + let(:prod2) { { "name" => "SLED", "status" => :available } } before do allow(Yast::Pkg).to receive(:ResolvableProperties).with("", :product, "")
