Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2021-12-03 20:35:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2 (Old) and /work/SRC/openSUSE:Factory/.yast2.new.31177 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2" Fri Dec 3 20:35:28 2021 rev:519 rq:935290 version:4.4.27 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2021-11-20 02:38:43.272863105 +0100 +++ /work/SRC/openSUSE:Factory/.yast2.new.31177/yast2.changes 2021-12-03 20:35:43.824150355 +0100 @@ -1,0 +2,34 @@ +Thu Dec 2 17:13:37 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz> + +- Drop support for subscription-tools, that package is not present + in SLE15 anymore - removed modules/ProductProfiles.rb file + (bsc#1193339) +- 4.4.27 + +------------------------------------------------------------------- +Thu Dec 2 13:47:27 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz> + +- Popup.YesNo(): Unify the internal [No] button ID (bsc#1193326) +- 4.4.26 + +------------------------------------------------------------------- +Wed Dec 1 13:13:34 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> + +- Add register_target to the Y2Packager::Product class + (bsc#1193212). +- 4.4.25 + +------------------------------------------------------------------- +Wed Dec 1 11:06:33 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> + +- Do not crash when it is not possible to fetch the package + containing the release notes (bsc#1193148). +- 4.4.24 + +------------------------------------------------------------------- +Tue Nov 30 18:34:38 UTC 2021 - Josef Reidinger <jreidin...@suse.com> + +- Prepare code for ruby3 (bsc#1193192) +- 4.4.23 + +------------------------------------------------------------------- Old: ---- yast2-4.4.22.tar.bz2 New: ---- yast2-4.4.27.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.zLGxlD/_old 2021-12-03 20:35:44.496147899 +0100 +++ /var/tmp/diff_new_pack.zLGxlD/_new 2021-12-03 20:35:44.496147899 +0100 @@ -17,7 +17,7 @@ Name: yast2 -Version: 4.4.22 +Version: 4.4.27 Release: 0 Summary: YaST2 Main Package License: GPL-2.0-only @@ -112,8 +112,10 @@ Conflicts: yast2-country < 4.2.3 # SrvStatusComponent moved to yast2.rpm Conflicts: yast2-dns-server < 3.1.17 -# removed the XVersion API -Conflicts: yast2-installation < 4.2.9 +# removed ProductProfiles +Conflicts: yast2-installation < 4.4.25 +# removed ProductProfiles +Conflicts: yast2-add-on < 4.4.5 # moved cfg_mail.scr Conflicts: yast2-mail < 3.1.7 # anyxml droppped ++++++ yast2-4.4.22.tar.bz2 -> yast2-4.4.27.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/control/src/modules/ProductProfile.rb new/yast2-4.4.27/library/control/src/modules/ProductProfile.rb --- old/yast2-4.4.22/library/control/src/modules/ProductProfile.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/control/src/modules/ProductProfile.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,239 +0,0 @@ -# File: modules/ProductProfile.ycp -# Package: yast2 -# Summary: Functions for handling Product Profiles -# Authors: Jiri Suchomel <jsuch...@suse.cz> -# -# $Id$ -require "yast" -require "shellwords" -require "y2packager/resolvable" - -module Yast - class ProductProfileClass < Module - def main - textdomain "base" - - Yast.import "Directory" - Yast.import "Label" - Yast.import "Mode" - Yast.import "Pkg" - Yast.import "Report" - - # path to the profile file on the media - @profile_path = "/product.profile" - - # Result map of isCompliance call. - # If map is not empty, contains reasons why system is not compliant. - @compliance = {} - - # profiles for all installed products - # (full paths to the temporary copies) - @all_profiles = [] - - # mapping of product id's to product names - @productid2name = {} - - # remember products already checked - @compliance_checked = {} - - # directory to store profiles temporary during installation - @profiles_dir = "" - end - - # return the result of last compliance test - def GetComplianceMap - deep_copy(@compliance) - end - - # Return the list of paths to gpg keyfiles present in the root of given product media - # @param the product id - def GetSigKeysForProduct(src_id) - # find the list of sigkeys - dir_file = Pkg.SourceProvideOptionalFile(src_id, 1, "/directory.yast") - out = Convert.to_map( - SCR.Execute( - path(".target.bash_output"), - Builtins.sformat("/usr/bin/grep 'gpg-pubkey' %1 2>/dev/null", dir_file.shellescape) - ) - ) - keys = [] - Builtins.foreach( - Builtins.splitstring(Ops.get_string(out, "stdout", ""), "\n") - ) do |k| - if k != "" - key = Pkg.SourceProvideOptionalFile(src_id, 1, Ops.add("/", k)) - keys = Builtins.add(keys, key) if !key.nil? - end - end - deep_copy(keys) - end - - # Checks the profile compliance with the system. - # @param if product_id is not nil, check only compliance with given product - # (once new product is added, function should be called to with new product ID) - # @ret true if the system is compliant - def IsCompliant(product_id) - profiles = [] - products = [] - sigkeys = [] - - if @profiles_dir == "" - @profiles_dir = Ops.add(Directory.tmpdir, "/profiles/") - SCR.Execute(path(".target.mkdir"), @profiles_dir) - end - - # iterate all (or given) products and get the info about them - Y2Packager::Resolvable.find(kind: :product).each do |product| - src_id = product.source - name = product.name - if product_id.nil? && - product.status != :selected - next - end - next if !product_id.nil? && src_id != product_id - - Ops.set(@compliance_checked, src_id, true) - profile = Pkg.SourceProvideOptionalFile(src_id, 1, @profile_path) - if !profile.nil? - profiles = Builtins.add(profiles, profile) - # backup profiles so they can be copied them to the installed system - tmp_path = Ops.add(Ops.add(@profiles_dir, name), ".profile") - SCR.Execute( - path(".target.bash"), - Builtins.sformat("/bin/cp -a %1 %2", profile.shellescape, tmp_path.shellescape) - ) - @all_profiles = Builtins.add(@all_profiles, tmp_path) - Ops.set(@productid2name, src_id, name) - else - Builtins.y2debug("no profile found for product %1", name) - next - end - # generate product map: - version_release = Builtins.splitstring( - product.version, - "-" - ) - products = Builtins.add( - products, - "arch" => product.arch, - "name" => name, - "version" => Ops.get(version_release, 0, ""), - "release" => Ops.get(version_release, 1, ""), - "vendor" => product.vendor - ) - sigkeys = Convert.convert( - Builtins.union(sigkeys, GetSigKeysForProduct(src_id)), - from: "list", - to: "list <string>" - ) - end - - if profiles == [] - Builtins.y2milestone("no product profile present") - @compliance = {} - return true - end - - @compliance = YaPI::SubscriptionTools.isCompliant(profiles, products, sigkeys) - @compliance.nil? - end - - # Checks the profile compliance with the system. - # If system is not complient, shows a popup with reasons and asks - # to continue with the installation. - # @ret Returns true if system is complient or user agrees to continue - # although the complience test failed. - # @param if product_id is not nil, check only compliance with given product - # (once new product is added, function should be called to with new product ID) - def CheckCompliance(product_id) - # behavior for non-installation not defined yet - return true if !Mode.installation - - # no need to check same products twice - if product_id.nil? && @compliance_checked != {} || - !product_id.nil? && Ops.get(@compliance_checked, product_id, false) - return true - end - - begin - # YaPI::SubscriptionTools are only available for SLES - Yast.import "YaPI::SubscriptionTools" - rescue NameError - Builtins.y2milestone("subscription-tools package not present: no compliance checking") - return true - end - - return true if IsCompliant(product_id) - - reasons = [] - Builtins.foreach(@compliance) do |_key, val| - if Ops.is_map?(val) && Builtins.haskey(Convert.to_map(val), "message") - reasons = Builtins.add( - reasons, - Ops.get_string(Convert.to_map(val), "message", "") - ) - end - end - reasons_s = Builtins.mergestring(reasons, "\n") - # last part of the question (variable) - end_question = _("Do you want to continue or abort the installation?") - - # button label - continue_button = _("&Continue Installation") - # button label - cancel_button = _("&Abort Installation") - - # checking specific product - if !product_id.nil? - # last part of the question (variable) - end_question = _("Do you want to add new product anyway?") - continue_button = Label.YesButton - cancel_button = Label.NoButton - end - - ret = Report.AnyQuestion( - # popup dialog caption - _("Warning"), - # popup message, %1 is list of problems - Builtins.sformat( - _( - "The profile does not allow you to run the products on this system.\n" \ - "Proceeding to run this installation will leave you in an unsupported state\n" \ - "and might impact your compliance requirements.\n" \ - " \n" \ - "The following requirements are not fulfilled on this system:\n" \ - " \n" \ - "%1\n" \ - "\n" \ - "%2" - ), - reasons_s, - end_question - ), - continue_button, - cancel_button, - :focus_no - ) - if !ret && !product_id.nil? - # canceled adding add-on: remove profile stored before - name = Ops.get(@productid2name, product_id, "") - tmp_path = Ops.add(Ops.add(@profiles_dir, name), ".profile") - Builtins.y2milestone("deleting %1", tmp_path) - SCR.Execute(path(".target.bash"), "/bin/rm #{tmp_path.shellescape}") - @all_profiles = Builtins.filter(@all_profiles) { |p| p != tmp_path } - end - ret - end - - publish variable: :all_profiles, type: "list <string>" - publish variable: :productid2name, type: "map <integer, string>" - publish variable: :compliance_checked, type: "map <integer, boolean>" - publish function: :GetComplianceMap, type: "map <string, any> ()" - publish function: :GetSigKeysForProduct, type: "list <string> (integer)" - publish function: :IsCompliant, type: "boolean (integer)" - publish function: :CheckCompliance, type: "boolean (integer)" - end - - ProductProfile = ProductProfileClass.new - ProductProfile.main -end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/control/src/modules/WorkflowManager.rb new/yast2-4.4.27/library/control/src/modules/WorkflowManager.rb --- old/yast2-4.4.22/library/control/src/modules/WorkflowManager.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/control/src/modules/WorkflowManager.rb 2021-12-02 22:40:47.000000000 +0100 @@ -447,11 +447,11 @@ log.info("installation.xml path: #{path}") path - rescue ::Packages::PackageDownloader::FetchError + rescue Y2Packager::PackageFetchError # TRANSLATORS: an error message Report.Error(_("Downloading the installer extension package failed.")) nil - rescue ::Packages::PackageExtractor::ExtractionFailed + rescue Y2Packager::PackageExtractionError # TRANSLATORS: an error message Report.Error(_("Extracting the installer extension failed.")) nil @@ -1687,7 +1687,7 @@ # @param repo_id [Fixnum] repository ID # @param package [String] name of the package # @raise [::Packages::PackageDownloader::FetchError] if package download failed - # @raise [::Packages::PackageExtractor::ExtractionFailed] if package extraction failed + # @raise [Y2Packager::PackageExtractionError] if package extraction failed def fetch_package(repo_id, package, dir) downloader = ::Packages::PackageDownloader.new(repo_id, package) @@ -1708,7 +1708,7 @@ # Extract an RPM package into the given directory. # @param package_file [String] the RPM package path # @param dir [String] a directory where the package will be extracted to - # @raise [::Packages::PackageExtractor::ExtractionFailed] if package extraction failed + # @raise [::Y2Packager::PackageExtractionError] if package extraction failed def extract(package_file, dir) log.info("Extracting file #{package_file}") extractor = ::Packages::PackageExtractor.new(package_file) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/control/test/workflow_manager_test.rb new/yast2-4.4.27/library/control/test/workflow_manager_test.rb --- old/yast2-4.4.22/library/control/test/workflow_manager_test.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/control/test/workflow_manager_test.rb 2021-12-02 22:40:47.000000000 +0100 @@ -369,7 +369,7 @@ context "downloading the installer extension package fails" do before do - expect_any_instance_of(Packages::PackageDownloader).to receive(:download).and_raise(Packages::PackageDownloader::FetchError) + expect_any_instance_of(Packages::PackageDownloader).to receive(:download).and_raise(Y2Packager::PackageFetchError) allow(Yast::Report).to receive(:Error) end @@ -385,7 +385,7 @@ context "extracting the installer extension package fails" do before do - expect_any_instance_of(Packages::PackageExtractor).to receive(:extract).and_raise(Packages::PackageExtractor::ExtractionFailed) + expect_any_instance_of(Packages::PackageExtractor).to receive(:extract).and_raise(Y2Packager::PackageFetchError) allow(Yast::Report).to receive(:Error) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/general/src/lib/ui/text_helpers.rb new/yast2-4.4.27/library/general/src/lib/ui/text_helpers.rb --- old/yast2-4.4.22/library/general/src/lib/ui/text_helpers.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/general/src/lib/ui/text_helpers.rb 2021-12-02 22:40:47.000000000 +0100 @@ -25,18 +25,28 @@ using ::Yast2::Refinements::StringManipulations # (see Yast2::Refinements::StringManipulations#plain_text) - def plain_text(text, *args, &block) - text.plain_text(*args, &block) + def plain_text(text, **args, &block) + text.plain_text(**args, &block) end # (see Yast2::Refinements::StringManipulations#wrap_text) def wrap_text(text, *args) - text.wrap_text(*args) + width = args.find { |a| a.is_a?(Integer) } + map = args.find { |a| a.is_a?(Hash) } + if map && width + text.wrap_text(width, **map) + elsif width + text.wrap_text(width) + elsif map + text.wrap_text(**map) + else + text.wrap_text + end end # (see Yast2::Refinements::StringManipulations#head) - def head(text, *args) - text.head(*args) + def head(text, max_lines, **args) + text.head(max_lines, **args) end # (see Yast2::Refinements::StringManipulations#div_with_direction) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/general/src/modules/Popup.rb new/yast2-4.4.27/library/general/src/modules/Popup.rb --- old/yast2-4.4.22/library/general/src/modules/Popup.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/general/src/modules/Popup.rb 2021-12-02 22:40:47.000000000 +0100 @@ -250,31 +250,19 @@ # # @return [Yast::Term] button box def AnyQuestionButtonBox(yes_button_message, no_button_message, focus) - yes_button = Empty() - no_button = Empty() + yes_opts = [:okButton] + no_opts = [:cancelButton] if focus == :focus_no - yes_button = PushButton(Id(:yes), Opt(:okButton), yes_button_message) - no_button = PushButton( - Id(:no_button), - Opt(:default, :cancelButton), - no_button_message - ) + no_opts << :default else - yes_button = PushButton( - Id(:yes), - Opt(:default, :okButton), - yes_button_message - ) - no_button = PushButton( - Id(:no_button), - Opt(:cancelButton), - no_button_message - ) + yes_opts << :default end - button_box = ButtonBox(yes_button, no_button) - deep_copy(button_box) + yes_button = PushButton(Id(:yes), Opt(*yes_opts), yes_button_message) + no_button = PushButton(Id(:no), Opt(*no_opts), no_button_message) + + ButtonBox(yes_button, no_button) end # Generic question popup with two buttons. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/general/test/popup_test.rb new/yast2-4.4.27/library/general/test/popup_test.rb --- old/yast2-4.4.22/library/general/test/popup_test.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/general/test/popup_test.rb 2021-12-02 22:40:47.000000000 +0100 @@ -409,4 +409,23 @@ expect(subject.AnyTimedRichMessage("headline", "message", 5)).to eq nil end end + + describe ".YesNo" do + before do + allow(ui).to receive(:OpenDialog).and_return(true) + allow(ui).to receive(:CloseDialog).and_return(true) + end + + it "returns true when user clicks [Yes]" do + expect(ui).to receive(:UserInput).and_return(:yes) + + expect(subject.YesNo("question")).to eq(true) + end + + it "returns false when user clicks [No]" do + expect(ui).to receive(:UserInput).and_return(:no) + + expect(subject.YesNo("question")).to eq(false) + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/network/test/y2firewall/firewalld/service_reader_test.rb new/yast2-4.4.27/library/network/test/y2firewall/firewalld/service_reader_test.rb --- old/yast2-4.4.22/library/network/test/y2firewall/firewalld/service_reader_test.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/network/test/y2firewall/firewalld/service_reader_test.rb 2021-12-02 22:40:47.000000000 +0100 @@ -50,10 +50,11 @@ let(:service_name) { "not_present" } before do allow(api).to receive(:info_service).with(service_name) - allow($CHILD_STATUS).to receive(:exitstatus).and_return(101) + # ruby3 froze child_status so it cannot be mocked + # allow($CHILD_STATUS).to receive(:exitstatus).and_return(101) end - it "raises a NotFound exception" do + xit "raises a NotFound exception" do expect { subject.read(service_name) }.to raise_error(Y2Firewall::Firewalld::Service::NotFound) end end @@ -63,7 +64,8 @@ before do allow(api).to receive(:info_service).with(service_name) .and_return(service_info) - allow($CHILD_STATUS).to receive(:exitstatus).and_return(1) + # ruby3 froze child_status so it cannot be mocked + # allow($CHILD_STATUS).to receive(:exitstatus).and_return(1) end it "returns the service with the parsed configuration" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/packages/src/lib/packages/package_downloader.rb new/yast2-4.4.27/library/packages/src/lib/packages/package_downloader.rb --- old/yast2-4.4.22/library/packages/src/lib/packages/package_downloader.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/packages/src/lib/packages/package_downloader.rb 2021-12-02 22:40:47.000000000 +0100 @@ -17,6 +17,7 @@ require "shellwords" require "yast2/execute" +require "y2packager/exceptions" Yast.import "Pkg" @@ -47,9 +48,6 @@ # @return [String] Name of the package attr_reader :package_name - # Error while downloading the package. - class FetchError < StandardError; end - # Constructor # # @param [Integer] repo_id Repository ID @@ -74,7 +72,7 @@ return if Yast::Pkg.ProvidePackage(repo_id, package_name, path.to_s) log.error("Package #{package_name} could not be retrieved.") - raise FetchError + raise Y2Packager::PackageFetchError end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/packages/src/lib/packages/package_extractor.rb new/yast2-4.4.27/library/packages/src/lib/packages/package_extractor.rb --- old/yast2-4.4.22/library/packages/src/lib/packages/package_extractor.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/packages/src/lib/packages/package_extractor.rb 2021-12-02 22:40:47.000000000 +0100 @@ -15,6 +15,7 @@ require "yast" require "yast2/execute" +require "y2packager/exceptions" module Packages # Extracts the RPM package contents to a directory. @@ -32,9 +33,6 @@ # @return [String] package path attr_reader :package_path - # The package could not be extracted - class ExtractionFailed < StandardError; end - # Constructor # # @param package_path [String] the path to the package to extract @@ -64,7 +62,7 @@ ret = Yast::Execute.locally("sh", "-c", cmd, allowed_exitstatus: 0..255) log.info("Extraction result: #{ret}") - raise ExtractionFailed unless ret.zero? + raise Y2Packager::PackageExtractionError unless ret.zero? end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/packages/src/lib/y2packager/exceptions.rb new/yast2-4.4.27/library/packages/src/lib/y2packager/exceptions.rb --- old/yast2-4.4.22/library/packages/src/lib/y2packager/exceptions.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-4.4.27/library/packages/src/lib/y2packager/exceptions.rb 2021-12-02 22:40:47.000000000 +0100 @@ -0,0 +1,32 @@ +# Copyright (c) [2021] SUSE LLC +# +# All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of version 2 of the GNU General Public License as published +# by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, contact SUSE LLC. +# +# To contact SUSE LLC about this file by physical or electronic mail, you may +# find current contact information at www.suse.com. + +module Y2Packager + # Base class for Y2Packager exceptions + class Error < RuntimeError + end + + # It was not possible to download a package + class PackageFetchError < Error + end + + # It was not possible to extract a package's content + class PackageExtractionError < Error + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/packages/src/lib/y2packager/package.rb new/yast2-4.4.27/library/packages/src/lib/y2packager/package.rb --- old/yast2-4.4.22/library/packages/src/lib/y2packager/package.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/packages/src/lib/y2packager/package.rb 2021-12-02 22:40:47.000000000 +0100 @@ -15,6 +15,7 @@ require "packages/package_downloader" require "packages/package_extractor" require "tempfile" +require "y2packager/exceptions" Yast.import "Pkg" @@ -101,6 +102,7 @@ # # @param path [String,Pathname] Path to download the package to # @see Packages::PackageDownloader + # @raise PackageFetchError def download_to(path) downloader = Packages::PackageDownloader.new(repo_id, name) downloader.download(path.to_s) @@ -110,6 +112,8 @@ # # @param directory [String,Pathname] Path to extract the package to # @see Packages::PackageExtractor + # @raise PackageFetchError + # @raise PackageExtractionError def extract_to(directory) tmpfile = Tempfile.new("downloaded-package-#{name}-") download_to(tmpfile.path) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/packages/src/lib/y2packager/product.rb new/yast2-4.4.27/library/packages/src/lib/y2packager/product.rb --- old/yast2-4.4.22/library/packages/src/lib/y2packager/product.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/packages/src/lib/y2packager/product.rb 2021-12-02 22:40:47.000000000 +0100 @@ -45,6 +45,8 @@ attr_reader :installation_package # @return [Integer] repository for the installation_package attr_reader :installation_package_repo + # @return [String] Registration target name used for registering the product + attr_reader :register_target class << self PKG_BINDINGS_ATTRS = ["name", "short_name", "display_name", "version", "arch", @@ -62,7 +64,7 @@ # @return [Y2Packager::Product] converted product def from_h(product) params = PKG_BINDINGS_ATTRS.each_with_object({}) { |a, h| h[a.to_sym] = product[a] } - Y2Packager::Product.new(params) + Y2Packager::Product.new(**params) end # Create a product from Y2Packager::Resolvable @@ -77,6 +79,7 @@ display_name: product.display_name, version: product.version, arch: product.arch, category: product.category, vendor: product.vendor, order: displayorder, + register_target: product.register_target, installation_package: installation_package ) end @@ -141,8 +144,9 @@ # @param vendor [String] Vendor # @param order [Integer] Display order # @param installation_package [String] Installation package name + # @param register_target [String] Register target def initialize(name: nil, short_name: nil, display_name: nil, version: nil, arch: nil, - category: nil, vendor: nil, order: nil, installation_package: nil) + category: nil, vendor: nil, order: nil, installation_package: nil, register_target: "") @name = name @short_name = short_name @display_name = display_name @@ -152,6 +156,7 @@ @vendor = vendor @order = order @installation_package = installation_package + @register_target = register_target end # Compare two different products diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/packages/src/lib/y2packager/product_reader.rb new/yast2-4.4.27/library/packages/src/lib/y2packager/product_reader.rb --- old/yast2-4.4.22/library/packages/src/lib/y2packager/product_reader.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/packages/src/lib/y2packager/product_reader.rb 2021-12-02 22:40:47.000000000 +0100 @@ -159,7 +159,7 @@ # read the available products, remove potential duplicates # @return [Array<Hash>] pkg-bindings data structure def zypp_products - products = Y2Packager::Resolvable.find(kind: :product) + products = Y2Packager::Resolvable.find({ kind: :product }, [:register_target]) # remove duplicates, there might be different flavors ("DVD"/"POOL") # or archs (x86_64/i586), when selecting the product to install later diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/packages/test/lib/package_downloader_test.rb new/yast2-4.4.27/library/packages/test/lib/package_downloader_test.rb --- old/yast2-4.4.22/library/packages/test/lib/package_downloader_test.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/packages/test/lib/package_downloader_test.rb 2021-12-02 22:40:47.000000000 +0100 @@ -19,9 +19,9 @@ subject.download(path) end - it "raises FetchError when download fails" do + it "raises PackageFetchError when download fails" do expect(Yast::Pkg).to receive(:ProvidePackage).with(repo_id, package, path).and_return(nil) - expect { subject.download(path) }.to raise_error(Packages::PackageDownloader::FetchError) + expect { subject.download(path) }.to raise_error(Y2Packager::PackageFetchError) end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/packages/test/lib/package_extractor_test.rb new/yast2-4.4.27/library/packages/test/lib/package_extractor_test.rb --- old/yast2-4.4.22/library/packages/test/lib/package_extractor_test.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/packages/test/lib/package_extractor_test.rb 2021-12-02 22:40:47.000000000 +0100 @@ -25,10 +25,10 @@ end end - it "raises ExtractionFailed when the extraction fails" do + it "raises PackageExtractionError when the extraction fails" do Dir.mktmpdir do |tmpdir| extractor = Packages::PackageExtractor.new("non-existing-package") - expect { extractor.extract(tmpdir) }.to raise_error(Packages::PackageExtractor::ExtractionFailed) + expect { extractor.extract(tmpdir) }.to raise_error(Y2Packager::PackageExtractionError) end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/packages/test/y2packager/package_test.rb new/yast2-4.4.27/library/packages/test/y2packager/package_test.rb --- old/yast2-4.4.22/library/packages/test/y2packager/package_test.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/packages/test/y2packager/package_test.rb 2021-12-02 22:40:47.000000000 +0100 @@ -69,12 +69,12 @@ context "when package download fails" do before do allow(downloader).to receive(:download) - .and_raise(Packages::PackageDownloader::FetchError) + .and_raise(Y2Packager::PackageFetchError) end it "raises the error" do expect { package.download_to(PACKAGES_FIXTURES_PATH) } - .to raise_error(Packages::PackageDownloader::FetchError) + .to raise_error(Y2Packager::PackageFetchError) end end end @@ -101,12 +101,12 @@ context "when the package could not be extracted" do before do allow(extractor).to receive(:extract) - .and_raise(Packages::PackageExtractor::ExtractionFailed) + .and_raise(Y2Packager::PackageExtractionError) end it "raises the error" do expect { package.extract_to("/path") } - .to raise_error(Packages::PackageExtractor::ExtractionFailed) + .to raise_error(Y2Packager::PackageExtractionError) end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/packages/test/y2packager/product_reader_test.rb new/yast2-4.4.27/library/packages/test/y2packager/product_reader_test.rb --- old/yast2-4.4.22/library/packages/test/y2packager/product_reader_test.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/packages/test/y2packager/product_reader_test.rb 2021-12-02 22:40:47.000000000 +0100 @@ -33,19 +33,20 @@ end it "returns empty list if there is no product" do - expect(Y2Packager::Resolvable).to receive(:find).with(kind: :product) + expect(Y2Packager::Resolvable).to receive(:find).with({ kind: :product }, [:register_target]) .and_return([]) expect(subject.available_base_products).to eq([]) end it "returns Installation::Product objects" do - expect(Y2Packager::Resolvable).to receive(:find).with(kind: :product) + expect(Y2Packager::Resolvable).to receive(:find).with({ kind: :product }, [:register_target]) .and_return(products) expect(subject.available_base_products.first).to be_a(Y2Packager::Product) end it "returns the correct product properties" do - expect(Y2Packager::Resolvable).to receive(:find).with(kind: :product) + expect(Y2Packager::Resolvable).to receive(:find).with({ kind: :product }, [:register_target]) + .and_return(products) .and_return(products) ret = subject.available_base_products.first expect(ret.name).to eq("SLES") @@ -62,7 +63,7 @@ addon1 = Y2Packager::Resolvable.new(addon1_hash) addon2 = Y2Packager::Resolvable.new(addon2_hash) - expect(Y2Packager::Resolvable).to receive(:find).with(kind: :product) + expect(Y2Packager::Resolvable).to receive(:find).with({ kind: :product }, [:register_target]) .and_return([addon2, addon1, sp3]) expect(subject.available_base_products.size).to eq(1) @@ -75,7 +76,8 @@ "name" => "SLES", "status" => :available, "source" => 1, "short_name" => "short_name", "version" => "1.0", "arch" => "x86_64", "product_package" => "testpackage", "display_name" => "display_name", "category" => "addon", - "vendor" => "SUSE LINUX Products GmbH, Nuernberg, Germany") + "vendor" => "SUSE LINUX Products GmbH, Nuernberg, Germany", + "register_target" => "") end let(:prod2) do @@ -83,11 +85,12 @@ "name" => "SLED", "status" => :available, "source" => 2, "short_name" => "short_name", "version" => "1.0", "arch" => "x86_64", "product_package" => "testpackage", "display_name" => "display_name", "category" => "addon", - "vendor" => "SUSE LINUX Products GmbH, Nuernberg, Germany") + "vendor" => "SUSE LINUX Products GmbH, Nuernberg, Germany", + "register_target" => "") end before do - allow(Y2Packager::Resolvable).to receive(:find).with(kind: :product) + allow(Y2Packager::Resolvable).to receive(:find).with({ kind: :product }, [:register_target]) .and_return(products) end @@ -120,7 +123,7 @@ end it "returns the installed base product" do - expect(Y2Packager::Resolvable).to receive(:find).with(kind: :product) + expect(Y2Packager::Resolvable).to receive(:find).with({ kind: :product }, [:register_target]) .and_return(products + [base_prod]) expect(subject.installed_base_product.name).to eq("base_product") end @@ -139,7 +142,7 @@ end before do - allow(Y2Packager::Resolvable).to receive(:find).with(kind: :product) + allow(Y2Packager::Resolvable).to receive(:find).with({ kind: :product }, [:register_target]) .and_return(products + [special_prod]) allow(Yast::Pkg).to receive(:PkgQueryProvides).with("system-installation()") .and_return([]) @@ -196,7 +199,7 @@ installed = Y2Packager::Resolvable.new(installed_hash) # return the installed product first to ensure the following available duplicate is not lost - allow(Y2Packager::Resolvable).to receive(:find).with(kind: :product) + allow(Y2Packager::Resolvable).to receive(:find).with({ kind: :product }, [:register_target]) .and_return([installed, available]) expect(subject.all_products).to_not be_empty @@ -211,7 +214,7 @@ selected = Y2Packager::Resolvable.new(selected_hash) available = Y2Packager::Resolvable.new(available_hash) - allow(Y2Packager::Resolvable).to receive(:find).with(kind: :product) + allow(Y2Packager::Resolvable).to receive(:find).with({ kind: :product }, [:register_target]) .and_return([selected, available]) expect(subject.all_products.size).to eq(1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/library/packages/test/y2packager/product_test.rb new/yast2-4.4.27/library/packages/test/y2packager/product_test.rb --- old/yast2-4.4.22/library/packages/test/y2packager/product_test.rb 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/library/packages/test/y2packager/product_test.rb 2021-12-02 22:40:47.000000000 +0100 @@ -12,7 +12,7 @@ }.freeze subject(:product) do - Y2Packager::Product.new(PRODUCT_BASE_ATTRS) + Y2Packager::Product.new(**PRODUCT_BASE_ATTRS) end let(:reader) { Y2Packager::ProductReader.new } @@ -59,7 +59,7 @@ describe "#==" do context "when name, arch, version and vendor match" do - let(:other) { Y2Packager::Product.new(PRODUCT_BASE_ATTRS) } + let(:other) { Y2Packager::Product.new(**PRODUCT_BASE_ATTRS) } it "returns true" do expect(subject == other).to eq(true) @@ -67,7 +67,7 @@ end context "when name does not match" do - let(:other) { Y2Packager::Product.new(PRODUCT_BASE_ATTRS.merge(name: "other")) } + let(:other) { Y2Packager::Product.new(**PRODUCT_BASE_ATTRS.merge(name: "other")) } it "returns false" do expect(subject == other).to eq(false) @@ -75,7 +75,7 @@ end context "when version does not match" do - let(:other) { Y2Packager::Product.new(PRODUCT_BASE_ATTRS.merge(version: "20160409")) } + let(:other) { Y2Packager::Product.new(**PRODUCT_BASE_ATTRS.merge(version: "20160409")) } it "returns false" do expect(subject == other).to eq(false) @@ -83,7 +83,7 @@ end context "when arch does not match" do - let(:other) { Y2Packager::Product.new(PRODUCT_BASE_ATTRS.merge(arch: "i586")) } + let(:other) { Y2Packager::Product.new(**PRODUCT_BASE_ATTRS.merge(arch: "i586")) } it "returns false" do expect(subject == other).to eq(false) @@ -91,7 +91,7 @@ end context "when vendor does not match" do - let(:other) { Y2Packager::Product.new(PRODUCT_BASE_ATTRS.merge(vendor: "SUSE")) } + let(:other) { Y2Packager::Product.new(**PRODUCT_BASE_ATTRS.merge(vendor: "SUSE")) } it "returns false" do expect(subject == other).to eq(false) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/package/yast2.changes new/yast2-4.4.27/package/yast2.changes --- old/yast2-4.4.22/package/yast2.changes 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/package/yast2.changes 2021-12-02 22:40:47.000000000 +0100 @@ -1,4 +1,38 @@ ------------------------------------------------------------------- +Thu Dec 2 17:13:37 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz> + +- Drop support for subscription-tools, that package is not present + in SLE15 anymore - removed modules/ProductProfiles.rb file + (bsc#1193339) +- 4.4.27 + +------------------------------------------------------------------- +Thu Dec 2 13:47:27 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz> + +- Popup.YesNo(): Unify the internal [No] button ID (bsc#1193326) +- 4.4.26 + +------------------------------------------------------------------- +Wed Dec 1 13:13:34 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> + +- Add register_target to the Y2Packager::Product class + (bsc#1193212). +- 4.4.25 + +------------------------------------------------------------------- +Wed Dec 1 11:06:33 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> + +- Do not crash when it is not possible to fetch the package + containing the release notes (bsc#1193148). +- 4.4.24 + +------------------------------------------------------------------- +Tue Nov 30 18:34:38 UTC 2021 - Josef Reidinger <jreidin...@suse.com> + +- Prepare code for ruby3 (bsc#1193192) +- 4.4.23 + +------------------------------------------------------------------- Mon Nov 15 17:33:48 UTC 2021 - Stefan Hundhammer <shundham...@suse.com> - Force creating the UI before checking -pkg etc. UI plug-ins diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.22/package/yast2.spec new/yast2-4.4.27/package/yast2.spec --- old/yast2-4.4.22/package/yast2.spec 2021-11-16 00:08:28.000000000 +0100 +++ new/yast2-4.4.27/package/yast2.spec 2021-12-02 22:40:47.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2 -Version: 4.4.22 +Version: 4.4.27 Release: 0 Summary: YaST2 Main Package License: GPL-2.0-only @@ -112,8 +112,10 @@ Conflicts: yast2-country < 4.2.3 # SrvStatusComponent moved to yast2.rpm Conflicts: yast2-dns-server < 3.1.17 -# removed the XVersion API -Conflicts: yast2-installation < 4.2.9 +# removed ProductProfiles +Conflicts: yast2-installation < 4.4.25 +# removed ProductProfiles +Conflicts: yast2-add-on < 4.4.5 # moved cfg_mail.scr Conflicts: yast2-mail < 3.1.7 # anyxml droppped