Hello community, here is the log from the commit of package yast2-packager for openSUSE:Factory checked in at 2016-08-31 00:02:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old) and /work/SRC/openSUSE:Factory/.yast2-packager.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-packager" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes 2016-08-22 10:48:31.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes 2016-08-31 00:02:55.000000000 +0200 @@ -1,0 +2,10 @@ +Tue Aug 23 11:17:36 UTC 2016 - [email protected] + +- Always enable "Next" button in license confirmation dialog, + because even if not accepted, popup is shown to user + (bnc#993530). +- Use the same popup when license not confirmed for base product in + the license confirmation dialog (bnc#993530). +- 3.1.116 + +------------------------------------------------------------------- Old: ---- yast2-packager-3.1.115.tar.bz2 New: ---- yast2-packager-3.1.116.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-packager.spec ++++++ --- /var/tmp/diff_new_pack.daazOE/_old 2016-08-31 00:02:56.000000000 +0200 +++ /var/tmp/diff_new_pack.daazOE/_new 2016-08-31 00:02:56.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 3.1.115 +Version: 3.1.116 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-packager-3.1.115.tar.bz2 -> yast2-packager-3.1.116.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.115/package/yast2-packager.changes new/yast2-packager-3.1.116/package/yast2-packager.changes --- old/yast2-packager-3.1.115/package/yast2-packager.changes 2016-08-19 17:01:17.000000000 +0200 +++ new/yast2-packager-3.1.116/package/yast2-packager.changes 2016-08-29 17:46:36.000000000 +0200 @@ -1,4 +1,14 @@ ------------------------------------------------------------------- +Tue Aug 23 11:17:36 UTC 2016 - [email protected] + +- Always enable "Next" button in license confirmation dialog, + because even if not accepted, popup is shown to user + (bnc#993530). +- Use the same popup when license not confirmed for base product in + the license confirmation dialog (bnc#993530). +- 3.1.116 + +------------------------------------------------------------------- Thu Aug 18 10:55:06 CEST 2016 - [email protected] - Do not raise an exception if no license is available (no licence diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.115/package/yast2-packager.spec new/yast2-packager-3.1.116/package/yast2-packager.spec --- old/yast2-packager-3.1.115/package/yast2-packager.spec 2016-08-19 17:01:17.000000000 +0200 +++ new/yast2-packager-3.1.116/package/yast2-packager.spec 2016-08-29 17:46:36.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package yast2-packager # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,62 +17,63 @@ Name: yast2-packager -Version: 3.1.115 +Version: 3.1.116 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: %{name}-%{version}.tar.bz2 Url: https://github.com/kobliha/yast-packager -Group: System/YaST -License: GPL-2.0+ -BuildRequires: yast2-country-data yast2-xml update-desktop-files yast2-testsuite +BuildRequires: update-desktop-files +BuildRequires: yast2-country-data BuildRequires: yast2-devtools >= 3.1.10 BuildRequires: yast2-storage +BuildRequires: yast2-testsuite +BuildRequires: yast2-xml BuildRequires: yast2_theme BuildRequires: rubygem(rspec) # Packages::Repository and Packages::Product classes -BuildRequires: yast2 >= 3.1.187 +BuildRequires: yast2 >= 3.1.187 # Pkg::SourceRawURL() and Pkg:ExpandedUrl() -BuildRequires: yast2-pkg-bindings >= 3.1.30 +BuildRequires: yast2-pkg-bindings >= 3.1.30 # Newly added RPM -Requires: yast2-country-data >= 2.16.3 +Requires: yast2-country-data >= 2.16.3 # Pkg::SourceRawURL() and Pkg:ExpandedUrl() -Requires: yast2-pkg-bindings >= 3.1.30 +Requires: yast2-pkg-bindings >= 3.1.30 # Packages::Repository and Packages::Product classes -Requires: yast2 >= 3.1.187 +Requires: yast2 >= 3.1.187 # unzipping license file -Requires: unzip +Requires: unzip # HTTP, FTP, HTTPS modules (inst_productsources.ycp) -Requires: yast2-transfer +Requires: yast2-transfer # XML module (inst_productsources.ycp) -Requires: yast2-xml +Requires: yast2-xml # Bugzilla #305503 - storing/checking MD5 of licenses -Requires: /usr/bin/md5sum +Requires: /usr/bin/md5sum # .process agent -Requires: yast2-core >= 2.16.35 +Requires: yast2-core >= 2.16.35 # setenv() builtin -Conflicts: yast2-core < 2.15.10 +Conflicts: yast2-core < 2.15.10 # NotEnoughMemory-related functions moved to misc.ycp import-file -Conflicts: yast2-add-on < 2.15.15 +Conflicts: yast2-add-on < 2.15.15 # One of libyui-qt-pkg, libyui-ncurses-pkg, libyui-gtk-pkg -Requires: libyui_pkg +Requires: libyui_pkg # ensure that 'checkmedia' is on the medium -Recommends: checkmedia +Recommends: checkmedia # for registering media add-ons on SLE # (openSUSE does not contain the registration module) @@ -81,12 +82,13 @@ %endif # force *-webpin subpackage removal at upgrade -Obsoletes: yast2-packager-webpin < %version Obsoletes: yast2-packager-devel-doc +Obsoletes: yast2-packager-webpin < %version Requires: yast2-ruby-bindings >= 1.0.0 -Summary: YaST2 - Package Library - +Summary: YaST2 - Package Library +License: GPL-2.0+ +Group: System/YaST %description This package contains the libraries and modules for software management. @@ -108,7 +110,6 @@ %postun %desktop_database_postun - %files %defattr(-,root,root) %dir %{yast_yncludedir}/checkmedia @@ -125,3 +126,5 @@ %{yast_execcompdir}/servers_non_y2/ag_* %dir %{yast_docdir} %doc %{yast_docdir}/COPYING + +%changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.115/src/modules/ProductLicense.rb new/yast2-packager-3.1.116/src/modules/ProductLicense.rb --- old/yast2-packager-3.1.115/src/modules/ProductLicense.rb 2016-08-19 17:01:17.000000000 +0200 +++ new/yast2-packager-3.1.116/src/modules/ProductLicense.rb 2016-08-29 17:46:36.000000000 +0200 @@ -471,16 +471,13 @@ _GetLicenseDialog_result ) - # If acceptance is not needed, there's no need to disable the button - # by default - default_next_button_state = AcceptanceNeeded(id) ? false : true - Wizard.SetContents( caption, contents, GetLicenseDialogHelp(), back, - default_next_button_state + # always allow next button, as if not accepted, it will raise popup (bnc#993530) + true ) # set the initial license download URL @@ -1082,14 +1079,23 @@ break end - # text changed due to bug #162499 - refuse_popup_text = base_product ? - # text asking whether to refuse a license (Yes-No popup) - _("Refusing the license agreement cancels the installation.\nReally refuse the agreement?") - : - # text asking whether to refuse a license (Yes-No popup) - _("Refusing the license agreement cancels the add-on\nproduct installation. Really refuse the agreement?") - next unless Popup.YesNo(refuse_popup_text) + if base_product + # TODO: refactor to use same widget as in inst_complex_welcome + # NOTE: keep in sync with inst_compex_welcome client, for grabing its translation + # mimic inst_complex_welcome behavior see bnc#993530 + refuse_popup_text = Builtins.dgettext( + 'installation', + 'You must accept the license to install this product' + ) + Popup.Message(refuse_popup_text) + next + else + # text changed due to bug #162499 + # TRANSLATORS: text asking whether to refuse a license (Yes-No popup) + refuse_popup_text = _("Refusing the license agreement cancels the add-on\n" \ + 'product installation. Really refuse the agreement?') + next unless Popup.YesNo(refuse_popup_text) + end log.info "License has been declined." @@ -1308,9 +1314,6 @@ VSpacing(0.5) ) : Empty() ) - # If acceptance is not needed, there's no need to disable the button - # by default - default_next_button_state = true Builtins.foreach(dirs) do |dir| counter = Ops.add(counter, 1) @@ -1360,7 +1363,6 @@ # Display info as a popup if exists InstShowInfo.show_info_txt(@info_file) if @info_file != nil Ops.set(licenses, counter, tmp_licenses) - default_next_button_state = false if AcceptanceNeeded(dir) end Wizard.SetContents( @@ -1368,7 +1370,7 @@ contents, GetLicenseDialogHelp(), enable_back, - default_next_button_state + true # always enable next, as popup is raised if not accepted (bnc#993530) ) Wizard.SetTitleIcon("yast-license") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.115/test/addon_product_test.rb new/yast2-packager-3.1.116/test/addon_product_test.rb --- old/yast2-packager-3.1.115/test/addon_product_test.rb 2016-08-19 17:01:17.000000000 +0200 +++ new/yast2-packager-3.1.116/test/addon_product_test.rb 2016-08-29 17:46:36.000000000 +0200 @@ -282,4 +282,45 @@ end end end + + describe "#AddRepo" do + let(:url) { "ftp://user:[email protected]/add-on" } + let(:pth) { "/" } + let(:prio) { 50 } + + context "when the repo is added successfully" do + let(:repo_id) { 1 } + + it "returns the new repository id" do + expect(Yast::Pkg).to receive(:RepositoryAdd) + .with("enabled" => true, "base_urls" => [url], "prod_dir" => pth, "priority" => prio) + .and_return(repo_id) + expect(subject.AddRepo(url, pth, prio)).to eq(repo_id) + end + + it "sets priority if it is greater than -1" do + expect(Yast::Pkg).to receive(:RepositoryAdd) + .with("enabled" => true, "base_urls" => [url], "prod_dir" => pth) + .and_return(repo_id) + expect(subject.AddRepo(url, pth, -2)).to eq(repo_id) + end + + it "refresh packages metadata" do + allow(Yast::Pkg).to receive(:RepositoryAdd).and_return(repo_id) + expect(Yast::Pkg).to receive(:SourceSaveAll) + expect(Yast::Pkg).to receive(:SourceRefreshNow).with(repo_id) + expect(Yast::Pkg).to receive(:SourceLoad) + subject.AddRepo(url, pth, prio) + end + end + + context "when the repo is not added successfully" do + it "reports the error and returns nil" do + allow(Yast::Pkg).to receive(:RepositoryAdd).and_return(nil) + expect(Yast::Report).to receive(:Error) + .with(format(_("Unable to add product %s."), "ftp://user:[email protected]/add-on")) + subject.AddRepo(url, pth, prio) + end + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.115/test/test_helper.rb new/yast2-packager-3.1.116/test/test_helper.rb --- old/yast2-packager-3.1.115/test/test_helper.rb 2016-08-19 17:01:17.000000000 +0200 +++ new/yast2-packager-3.1.116/test/test_helper.rb 2016-08-29 17:46:37.000000000 +0200 @@ -13,3 +13,8 @@ TESTS_PATH = Pathname.new(File.dirname(__FILE__)) FIXTURES_PATH = TESTS_PATH.join("data") + +RSpec.configure do |config| + config.extend Yast::I18n # available in context/describe + config.include Yast::I18n # available in it/let/before/... +end
