Skip to content

Commit

Permalink
Merge pull request #179 from yast/fix_commit_params_master
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak authored Sep 14, 2023
2 parents 8ac4bc4 + b0dfcfb commit b9d41f4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
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 @@
-------------------------------------------------------------------
Wed Sep 13 16:36:53 UTC 2023 - Ladislav Slezák <[email protected]>

- Fixed crash in the Pkg.Commit() function when passing
"exclude_docs" or "no_signature" options (bsc#1215238)
- 5.0.1

-------------------------------------------------------------------
Wed Aug 30 20:16:10 UTC 2023 - Josef Reidinger <[email protected]>

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: 5.0.0
Version: 5.0.1
Release: 0
Summary: YaST2 - Package Manager Access
License: GPL-2.0-only
Expand Down
12 changes: 6 additions & 6 deletions src/Package.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2500,12 +2500,12 @@ YCPValue PkgFunctions::Commit (const YCPMap& config)
bool exclude_docs = config->value(key)->asBoolean()->value();
commit_policy->rpmExcludeDocs(exclude_docs);

y2milestone("Excluding documentation: %s", config->value(key)->asString()->value().c_str());
y2milestone("Excluding documentation: %s", config->value(key)->toString().c_str());
}
else
{
y2error("Exclude documentation option: boolean is required, got: %s", config->value(key)->asString()->value().c_str());
_last_error.setLastError(std::string("Invalid exclude documentation option: ") + config->value(key)->asString()->value());
y2error("Exclude documentation option: boolean is required, got: %s", config->value(key)->toString().c_str());
_last_error.setLastError(std::string("Invalid exclude documentation option: ") + config->value(key)->toString());

delete commit_policy;
commit_policy = NULL;
Expand All @@ -2523,12 +2523,12 @@ YCPValue PkgFunctions::Commit (const YCPMap& config)
bool no_signature = config->value(key)->asBoolean()->value();
commit_policy->rpmNoSignature(no_signature);

y2milestone("Don't check RPM signature: %s", config->value(key)->asString()->value().c_str());
y2milestone("Don't check RPM signature: %s", config->value(key)->toString().c_str());
}
else
{
y2error("No signature option: boolean is required, got: %s", config->value(key)->asString()->value().c_str());
_last_error.setLastError(std::string("Invalid no signature option: ") + config->value(key)->asString()->value());
y2error("No signature option: boolean is required, got: %s", config->value(key)->toString().c_str());
_last_error.setLastError(std::string("Invalid no signature option: ") + config->value(key)->toString());

delete commit_policy;
commit_policy = NULL;
Expand Down

0 comments on commit b9d41f4

Please sign in to comment.