Hello community,
here is the log from the commit of package yast2-registration for
openSUSE:Leap:15.2 checked in at 2020-06-04 16:01:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/yast2-registration (Old)
and /work/SRC/openSUSE:Leap:15.2/.yast2-registration.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-registration"
Thu Jun 4 16:01:15 2020 rev:153 rq:810296 version:4.2.41
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/yast2-registration/yast2-registration.changes
2020-04-17 13:36:37.344178310 +0200
+++
/work/SRC/openSUSE:Leap:15.2/.yast2-registration.new.3606/yast2-registration.changes
2020-06-04 16:01:21.794978421 +0200
@@ -1,0 +2,7 @@
+Thu May 28 10:50:51 UTC 2020 - Martin Vidner <[email protected]>
+
+- Declining/refusal of an addon license means canceling all addons.
+ (bsc#1169577)
+- 4.2.41
+
+-------------------------------------------------------------------
Old:
----
yast2-registration-4.2.40.tar.bz2
New:
----
yast2-registration-4.2.41.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-registration.spec ++++++
--- /var/tmp/diff_new_pack.Uc9zZy/_old 2020-06-04 16:01:22.210979852 +0200
+++ /var/tmp/diff_new_pack.Uc9zZy/_new 2020-06-04 16:01:22.214979866 +0200
@@ -12,12 +12,12 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: yast2-registration
-Version: 4.2.40
+Version: 4.2.41
Release: 0
Summary: YaST2 - Registration Module
License: GPL-2.0-only
++++++ yast2-registration-4.2.40.tar.bz2 -> yast2-registration-4.2.41.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-registration-4.2.40/Dockerfile
new/yast2-registration-4.2.41/Dockerfile
--- old/yast2-registration-4.2.40/Dockerfile 2020-04-09 14:25:51.000000000
+0200
+++ new/yast2-registration-4.2.41/Dockerfile 2020-05-28 16:21:41.000000000
+0200
@@ -1,3 +1,3 @@
-FROM registry.opensuse.org/yast/head/containers/yast-ruby:latest
+FROM registry.opensuse.org/yast/sle-15/sp2/containers/yast-ruby
COPY . /usr/src/app
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-registration-4.2.40/Rakefile
new/yast2-registration-4.2.41/Rakefile
--- old/yast2-registration-4.2.40/Rakefile 2020-04-09 14:25:51.000000000
+0200
+++ new/yast2-registration-4.2.41/Rakefile 2020-05-28 16:21:41.000000000
+0200
@@ -1,5 +1,7 @@
require "yast/rake"
+Yast::Tasks.submit_to :sle15sp2
+
Yast::Tasks.configuration do |conf|
# lets ignore license check for now
conf.skip_license_check << /.*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-4.2.40/package/yast2-registration.changes
new/yast2-registration-4.2.41/package/yast2-registration.changes
--- old/yast2-registration-4.2.40/package/yast2-registration.changes
2020-04-09 14:25:51.000000000 +0200
+++ new/yast2-registration-4.2.41/package/yast2-registration.changes
2020-05-28 16:21:41.000000000 +0200
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Thu May 28 10:50:51 UTC 2020 - Martin Vidner <[email protected]>
+
+- Declining/refusal of an addon license means canceling all addons.
+ (bsc#1169577)
+- 4.2.41
+
+-------------------------------------------------------------------
Thu Apr 9 12:18:33 UTC 2020 - Stefan Hundhammer <[email protected]>
- Crash fix: Added missing require (bsc#1167945)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-4.2.40/package/yast2-registration.spec
new/yast2-registration-4.2.41/package/yast2-registration.spec
--- old/yast2-registration-4.2.40/package/yast2-registration.spec
2020-04-09 14:25:51.000000000 +0200
+++ new/yast2-registration-4.2.41/package/yast2-registration.spec
2020-05-28 16:21:41.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-registration
-Version: 4.2.40
+Version: 4.2.41
Release: 0
Summary: YaST2 - Registration Module
License: GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-4.2.40/src/lib/registration/addon.rb
new/yast2-registration-4.2.41/src/lib/registration/addon.rb
--- old/yast2-registration-4.2.40/src/lib/registration/addon.rb 2020-04-09
14:25:51.000000000 +0200
+++ new/yast2-registration-4.2.41/src/lib/registration/addon.rb 2020-05-28
16:21:41.000000000 +0200
@@ -26,7 +26,8 @@
require "y2packager/resolvable"
module Registration
- # this is a wrapper class around SUSE::Connect::Product object
+ # A wrapper class around SUSE::Connect::Product object,
+ # https://rubydoc.info/github/SUSE/connect/SUSE/Connect/Product
class Addon
extend Yast::I18n
include Yast::I18n
@@ -38,6 +39,7 @@
# read the remote add-on from the registration server
# @param registration [Registration::Registration] use this object for
# reading the remote add-ons
+ # @return [Array<Addon>]
def find_all(registration)
return @cached_addons if @cached_addons
@@ -83,7 +85,7 @@
@auto_selected = nil
end
- # list of auto selected add-ons
+ # @return [Array<Addon>] auto selected add-ons
def auto_selected
@auto_selected ||= detect_auto_selection
end
@@ -155,6 +157,7 @@
result
end
+ # @return [Array<Addon>]
def load_addons(registration)
pure_addons = registration.get_addon_list
# get IDs of the already activated addons
@@ -172,6 +175,7 @@
end
end
+ # @return [Array<Addon>]
def detect_auto_selection
required = selected + registered
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-4.2.40/src/lib/registration/ui/addon_eula_dialog.rb
new/yast2-registration-4.2.41/src/lib/registration/ui/addon_eula_dialog.rb
--- old/yast2-registration-4.2.40/src/lib/registration/ui/addon_eula_dialog.rb
2020-04-09 14:25:51.000000000 +0200
+++ new/yast2-registration-4.2.41/src/lib/registration/ui/addon_eula_dialog.rb
2020-05-28 16:21:41.000000000 +0200
@@ -48,6 +48,9 @@
false
)
+ # Default: no EULA specified => accepted
+ eula_ret = :accepted
+
addons.each do |addon|
next unless addon.eula_acceptance_needed?
next if addon.registered?
@@ -55,10 +58,13 @@
log.info "Addon '#{addon.name}' has an EULA at #{addon.eula_url}"
eula_ret = accept_eula(addon)
- return eula_ret if eula_ret != :next
+ # any declined license needs to be handled separately
+ break if eula_ret != :accepted
end
- :next
+ # go back if any EULA has not been accepted, let the user
+ # deselect the not accepted extension
+ eula_ret == :accepted ? :next : eula_ret
end
private
@@ -104,34 +110,35 @@
display_optional_info(File.join(tmpdir, "README.BETA"))
end
- # run the EULA agreement dialog
+ # Run the EULA agreement dialog.
# @param [EulaReader] eula_reader read EULAs
- # @return [Symbol] :accepted, :back, :abort, :halt - user input
+ # @return [Symbol] :accepted, :back
def run_eula_dialog(eula_reader)
base_product = false
- cancel_action = "refuse"
+ cancel_action = "abort"
ret =
Yast::ProductLicense.HandleLicenseDialogRet(arg_ref(eula_reader.licenses),
base_product, cancel_action)
+ ret = :back if ret == :abort
log.debug "EULA dialog result: #{ret}"
ret
end
- # ask user to accept an addon EULA
+ # Ask user to accept an addon EULA.
+ # Declining (refusing) the license is translated into Back
+ # which will fit nicely from the caller's point of view.
# @param [Addon] addon the addon
- # @return [Symbol] :back, :abort, :halt
+ # @return [Symbol] :accepted, :back
def accept_eula(addon)
Dir.mktmpdir("extension-eula-") do |tmpdir|
return :back unless download_eula(addon, tmpdir)
eula_reader = EulaReader.new(tmpdir)
license = find_license(addon, eula_reader)
- return :next if license && license.accepted?
+ return :accepted if license && license.accepted?
setup_eula_dialog(addon, eula_reader, tmpdir)
ret = run_eula_dialog(eula_reader)
license.accept! if ret == :accepted
-
- return :next if [:accepted, :refused].include?(ret)
ret
end
ensure
@@ -144,6 +151,7 @@
Yast::InstShowInfo.show_info_txt(info_file) if File.exist?(info_file)
end
+ # @return [Y2Packager::License]
def find_license(addon, eula_reader)
license_file = eula_reader.licenses[Y2Packager::License::DEFAULT_LANG]
return nil unless license_file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-4.2.40/test/registration/ui/addon_eula_dialog_test.rb
new/yast2-registration-4.2.41/test/registration/ui/addon_eula_dialog_test.rb
---
old/yast2-registration-4.2.40/test/registration/ui/addon_eula_dialog_test.rb
2020-04-09 14:25:51.000000000 +0200
+++
new/yast2-registration-4.2.41/test/registration/ui/addon_eula_dialog_test.rb
2020-05-28 16:21:41.000000000 +0200
@@ -57,7 +57,7 @@
context "when there are EULA acceptances pending" do
let(:addons) { [addon_with_eula, second_addon_with_eula] }
- let(:first_dialog_response) { :refused }
+ let(:first_dialog_response) { :accepted }
let(:second_dialog_response) { :accepted }
before do
@@ -76,8 +76,8 @@
context "and the user wants to abort" do
let(:first_dialog_response) { :abort }
- it "returns :abort" do
- expect(subject.run).to eq(:abort)
+ it "returns :back anyway" do
+ expect(subject.run).to eq(:back)
end
end
@@ -124,15 +124,15 @@
before do
allow(Yast::ProductLicense).to receive(:HandleLicenseDialogRet)
- .and_return(:refused)
+ .and_return(:abort)
end
it "does not set it as accepted" do
expect(product_license).to_not receive(:accept!)
end
- it "returns :next" do
- expect(dialog.run).to eq(:next)
+ it "returns :back" do
+ expect(dialog.run).to eq(:back)
end
end
end
@@ -198,8 +198,8 @@
context "when the license was previously accepted" do
let(:accepted?) { true }
- it "returns :next" do
- expect(dialog.send(:accept_eula, addon)).to eq(:next)
+ it "returns :accepted" do
+ expect(dialog.send(:accept_eula, addon)).to eq(:accepted)
end
it "does not show the eula" do