Hello community,
here is the log from the commit of package yast2-registration for
openSUSE:Factory checked in at 2018-07-24 17:28:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-registration (Old)
and /work/SRC/openSUSE:Factory/.yast2-registration.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-registration"
Tue Jul 24 17:28:05 2018 rev:21 rq:623678 version:4.0.43
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-registration/yast2-registration.changes
2018-07-03 23:32:38.640555826 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-registration.new/yast2-registration.changes
2018-07-24 17:28:11.959744296 +0200
@@ -1,0 +2,6 @@
+Wed Jul 18 10:45:15 CEST 2018 - [email protected]
+
+- Do not crash if getting zypp lock failed. (bnc#1043125)
+- 4.0.43
+
+-------------------------------------------------------------------
Old:
----
yast2-registration-4.0.42.tar.bz2
New:
----
yast2-registration-4.0.43.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-registration.spec ++++++
--- /var/tmp/diff_new_pack.T5UJQ5/_old 2018-07-24 17:28:12.891745478 +0200
+++ /var/tmp/diff_new_pack.T5UJQ5/_new 2018-07-24 17:28:12.895745483 +0200
@@ -17,7 +17,7 @@
Name: yast2-registration
-Version: 4.0.42
+Version: 4.0.43
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-registration-4.0.42.tar.bz2 -> yast2-registration-4.0.43.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-4.0.42/package/yast2-registration.changes
new/yast2-registration-4.0.43/package/yast2-registration.changes
--- old/yast2-registration-4.0.42/package/yast2-registration.changes
2018-07-02 17:15:57.000000000 +0200
+++ new/yast2-registration-4.0.43/package/yast2-registration.changes
2018-07-18 16:46:49.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Jul 18 10:45:15 CEST 2018 - [email protected]
+
+- Do not crash if getting zypp lock failed. (bnc#1043125)
+- 4.0.43
+
+-------------------------------------------------------------------
Mon Jul 2 17:05:19 CEST 2018 - [email protected]
- Added additional searchkeys to desktop file (fate#321043).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-4.0.42/package/yast2-registration.spec
new/yast2-registration-4.0.43/package/yast2-registration.spec
--- old/yast2-registration-4.0.42/package/yast2-registration.spec
2018-07-02 17:15:57.000000000 +0200
+++ new/yast2-registration-4.0.43/package/yast2-registration.spec
2018-07-18 16:46:49.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-registration
-Version: 4.0.42
+Version: 4.0.43
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-registration-4.0.42/src/clients/scc.rb
new/yast2-registration-4.0.43/src/clients/scc.rb
--- old/yast2-registration-4.0.42/src/clients/scc.rb 2018-07-02
17:15:57.000000000 +0200
+++ new/yast2-registration-4.0.43/src/clients/scc.rb 2018-07-18
16:46:49.000000000 +0200
@@ -52,6 +52,12 @@
return WFM.call("inst_scc", WFM.Args)
rescue Registration::SourceRestoreError => e
retry if fix_repositories(e.message)
+ rescue Registration::PkgAborted => e
+ # Libzypp init has failed because another application
+ # has already locked the zypp stack. The user has already
+ # decided to exit the module. So nothing more has to be
+ # done here.
+ log.info "User abort..."
ensure
Wizard.CloseDialog
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-4.0.42/src/lib/registration/exceptions.rb
new/yast2-registration-4.0.43/src/lib/registration/exceptions.rb
--- old/yast2-registration-4.0.42/src/lib/registration/exceptions.rb
2018-07-02 17:15:57.000000000 +0200
+++ new/yast2-registration-4.0.43/src/lib/registration/exceptions.rb
2018-07-18 16:46:49.000000000 +0200
@@ -41,4 +41,9 @@
# generic download error
class DownloadError < RuntimeError
end
+
+ # User decision to abort because libzypp has already been
+ # locked by another application.
+ class PkgAborted < RuntimeError
+ end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-4.0.42/src/lib/registration/sw_mgmt.rb
new/yast2-registration-4.0.43/src/lib/registration/sw_mgmt.rb
--- old/yast2-registration-4.0.42/src/lib/registration/sw_mgmt.rb
2018-07-02 17:15:57.000000000 +0200
+++ new/yast2-registration-4.0.43/src/lib/registration/sw_mgmt.rb
2018-07-18 16:46:49.000000000 +0200
@@ -68,6 +68,9 @@
def self.init(load_packages = false)
# false = do not allow continuing without the libzypp lock
lock = PackageLock.Connect(false)
+ # User would like to abort
+ raise_pkg_exception(PkgAborted) if lock["aborted"]
+ # locking has failed
raise_pkg_exception unless lock["connected"]
# display progress when refreshing repositories
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-registration-4.0.42/test/sw_mgmt_spec.rb
new/yast2-registration-4.0.43/test/sw_mgmt_spec.rb
--- old/yast2-registration-4.0.42/test/sw_mgmt_spec.rb 2018-07-02
17:15:57.000000000 +0200
+++ new/yast2-registration-4.0.43/test/sw_mgmt_spec.rb 2018-07-18
16:46:49.000000000 +0200
@@ -50,11 +50,13 @@
describe ".init" do
before do
- allow(Yast::PackageLock).to receive(:Connect).and_return("connected" =>
connected)
+ allow(Yast::PackageLock).to receive(:Connect).and_return("connected" =>
connected,
+ "aborted" =>
aborted)
end
context "when the libzypp lock can be obtained" do
let(:connected) { true }
+ let(:aborted) { false }
before do
expect(Yast::PackageCallbacks).to receive(:InitPackageCallbacks)
@@ -76,10 +78,22 @@
end
context "when the libzypp lock cannot be obtained" do
- let(:connected) { false }
+ context "when user has NOT aborted" do
+ let(:connected) { false }
+ let(:aborted) { false }
+
+ it "raises an PkgError exception" do
+ expect { subject.init }.to raise_error(Registration::PkgError)
+ end
+ end
- it "raises an PkgError exception" do
- expect { subject.init }.to raise_error(Registration::PkgError)
+ context "when user has aborted" do
+ let(:connected) { false }
+ let(:aborted) { true }
+
+ it "raises an PkgAborted exception" do
+ expect { subject.init }.to raise_error(Registration::PkgAborted)
+ end
end
end
end