Skip to content

Commit

Permalink
Add a hint to the "locked" error message (gh#yast/yast-yast2#1102)
Browse files Browse the repository at this point in the history
- 4.3.4
  • Loading branch information
lslezak committed Nov 3, 2020
1 parent 7be3473 commit e680d59
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package/yast2-pkg-bindings-devel-doc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

Name: yast2-pkg-bindings-devel-doc
Version: 4.3.3
Version: 4.3.4
Release: 0
License: GPL-2.0-only
Group: Documentation/HTML
Expand Down
7 changes: 7 additions & 0 deletions package/yast2-pkg-bindings.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Nov 3 08:53:18 UTC 2020 - Ladislav Slezák <lslezak@suse.cz>

- Add a hint to the "locked" error message
(gh#yast/yast-yast2#1102)
- 4.3.4

-------------------------------------------------------------------
Mon Oct 5 08:27:39 UTC 2020 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-pkg-bindings.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-pkg-bindings
Version: 4.3.3
Version: 4.3.4
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
14 changes: 12 additions & 2 deletions src/PkgFunctions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,18 @@ PkgFunctions::Connect()
}
catch(const zypp::ZYppFactoryException &excpt)
{
y2error("Error in Connect: FactoryException: %s", excpt.asString().c_str());
_last_error.setLastError(excpt.asString());
std::string msg(excpt.asString());
y2error("Error in Connect: FactoryException: %s", msg.c_str());

// running "/usr/bin/ruby.ruby2.5" application is not a good hint for users,
// very likely it is another YaST instance already running,
// add a hint to the error message from libzypp
if (excpt.lockerName().find("ruby") != std::string::npos)
{
msg += std::string("\n\n") + _("Maybe another YaST application is already running?");
}

_last_error.setLastError(msg);
}
catch (const zypp::Exception& excpt)
{
Expand Down

0 comments on commit e680d59

Please sign in to comment.