Hello community,
here is the log from the commit of package yast2-pkg-bindings for
openSUSE:Factory checked in at 2015-07-05 17:52:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-pkg-bindings (Old)
and /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-pkg-bindings"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-pkg-bindings/yast2-pkg-bindings.changes
2015-06-12 21:15:18.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new/yast2-pkg-bindings.changes
2015-07-05 17:53:00.000000000 +0200
@@ -1,0 +2,13 @@
+Thu Jul 2 18:21:06 UTC 2015 - [email protected]
+
+- added "allowVendorChange" option to Pkg.SetSolverFlags() to
+ allow configuring the vendor change flag (FATE#319138)
+- 3.1.26
+
+-------------------------------------------------------------------
+Fri Jun 19 09:23:22 UTC 2015 - [email protected]
+
+- fixed saving removed services (needed for FATE#315161)
+- 3.1.25
+
+-------------------------------------------------------------------
Old:
----
yast2-pkg-bindings-3.1.24.tar.bz2
New:
----
yast2-pkg-bindings-3.1.26.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.hcPx11/_old 2015-07-05 17:53:01.000000000 +0200
+++ /var/tmp/diff_new_pack.hcPx11/_new 2015-07-05 17:53:01.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings-devel-doc
-Version: 3.1.24
+Version: 3.1.26
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: yast2-pkg-bindings-%{version}.tar.bz2
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.hcPx11/_old 2015-07-05 17:53:01.000000000 +0200
+++ /var/tmp/diff_new_pack.hcPx11/_new 2015-07-05 17:53:01.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings
-Version: 3.1.24
+Version: 3.1.26
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-pkg-bindings-3.1.24.tar.bz2 -> yast2-pkg-bindings-3.1.26.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-pkg-bindings-3.1.24/package/yast2-pkg-bindings-devel-doc.spec
new/yast2-pkg-bindings-3.1.26/package/yast2-pkg-bindings-devel-doc.spec
--- old/yast2-pkg-bindings-3.1.24/package/yast2-pkg-bindings-devel-doc.spec
2015-06-11 11:10:27.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.26/package/yast2-pkg-bindings-devel-doc.spec
2015-07-03 10:45:39.000000000 +0200
@@ -16,7 +16,7 @@
#
Name: yast2-pkg-bindings-devel-doc
-Version: 3.1.24
+Version: 3.1.26
Release: 0
License: GPL-2.0
Group: Documentation/HTML
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-pkg-bindings-3.1.24/package/yast2-pkg-bindings.changes
new/yast2-pkg-bindings-3.1.26/package/yast2-pkg-bindings.changes
--- old/yast2-pkg-bindings-3.1.24/package/yast2-pkg-bindings.changes
2015-06-11 11:10:27.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.26/package/yast2-pkg-bindings.changes
2015-07-03 10:45:39.000000000 +0200
@@ -1,4 +1,17 @@
-------------------------------------------------------------------
+Thu Jul 2 18:21:06 UTC 2015 - [email protected]
+
+- added "allowVendorChange" option to Pkg.SetSolverFlags() to
+ allow configuring the vendor change flag (FATE#319138)
+- 3.1.26
+
+-------------------------------------------------------------------
+Fri Jun 19 09:23:22 UTC 2015 - [email protected]
+
+- fixed saving removed services (needed for FATE#315161)
+- 3.1.25
+
+-------------------------------------------------------------------
Wed Jun 10 15:09:51 UTC 2015 - [email protected]
- added support for the file conflicts callbacks (bnc#923590)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-pkg-bindings-3.1.24/package/yast2-pkg-bindings.spec
new/yast2-pkg-bindings-3.1.26/package/yast2-pkg-bindings.spec
--- old/yast2-pkg-bindings-3.1.24/package/yast2-pkg-bindings.spec
2015-06-11 11:10:27.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.26/package/yast2-pkg-bindings.spec
2015-07-03 10:45:39.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings
-Version: 3.1.24
+Version: 3.1.26
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-pkg-bindings-3.1.24/src/Package.cc
new/yast2-pkg-bindings-3.1.26/src/Package.cc
--- old/yast2-pkg-bindings-3.1.24/src/Package.cc 2015-06-11
11:10:27.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.26/src/Package.cc 2015-07-03
10:45:39.000000000 +0200
@@ -1785,6 +1785,8 @@
@builtin SetSolverFlags
@short Set solver flags (options)
@param map params solver options, currently accepted options are:
+ "allowVendorChange" : boolean or nil, (allow (true) or forbid (false)
+ vendor change, nil = set the default value from zypp.conf file)
"ignoreAlreadyRecommended" : boolean, (do not select recommended packages
for already installed packages)
"onlyRequires" : boolean, (do not select recommended packages, recommended
language packages, modalias packages...)
"reset" : boolean - if set to true then the solver is reset (all added
extra requires/conflicts added by user are removed, fixsystem mode is disabled,
additional data about solver run are cleared)
@@ -1793,8 +1795,35 @@
YCPValue PkgFunctions::SetSolverFlags(const YCPMap& params)
{
+ if (params.isNull())
+ {
+ return YCPBoolean(true);
+ }
+
+ const YCPString vendor_key("allowVendorChange");
+ if (!params->value(vendor_key).isNull())
+ {
+ // check for nil value
+ if (params->value(vendor_key)->isVoid())
+ {
+ y2milestone("Resetting the vendor change flag to the default
value");
+ // reset to default
+ zypp_ptr()->resolver()->setDefaultAllowVendorChange();
+
+ bool allowed = zypp_ptr()->resolver()->allowVendorChange();
+ y2milestone("Vendor change is now %s", allowed ? "enabled" :
"disabled");
+ }
+ else if (params->value(vendor_key)->isBoolean())
+ {
+ bool allow_change =
params->value(vendor_key)->asBoolean()->value();
+
+ y2milestone("Vendor change set to %s", allow_change ? "enabled" :
"disabled");
+ zypp_ptr()->resolver()->setAllowVendorChange(allow_change);
+ }
+ }
+
const YCPString reset_key("reset");
- if (!params.isNull() && !params->value(reset_key).isNull() &&
params->value(reset_key)->isBoolean())
+ if (!params->value(reset_key).isNull() &&
params->value(reset_key)->isBoolean())
{
bool reset = params->value(reset_key)->asBoolean()->value();
@@ -1808,7 +1837,7 @@
}
const YCPString ignore_key("ignoreAlreadyRecommended");
- if (!params.isNull() && !params->value(ignore_key).isNull() &&
params->value(ignore_key)->isBoolean())
+ if (!params->value(ignore_key).isNull() &&
params->value(ignore_key)->isBoolean())
{
bool ignoreAlreadyRecommended =
params->value(ignore_key)->asBoolean()->value();
y2milestone("Setting solver flag ignoreAlreadyRecommended: %d",
ignoreAlreadyRecommended);
@@ -1816,7 +1845,7 @@
}
const YCPString requires_key("onlyRequires");
- if (!params.isNull() && !params->value(requires_key).isNull() &&
params->value(requires_key)->isBoolean())
+ if (!params->value(requires_key).isNull() &&
params->value(requires_key)->isBoolean())
{
bool onlyRequires = params->value(requires_key)->asBoolean()->value();
y2milestone("Setting solver flag onlyRequires: %d", onlyRequires);
@@ -1837,6 +1866,7 @@
ret->add(YCPString("onlyRequires"),
YCPBoolean(zypp_ptr()->resolver()->onlyRequires()));
ret->add(YCPString("ignoreAlreadyRecommended"),
YCPBoolean(zypp_ptr()->resolver()->ignoreAlreadyRecommended()));
+ ret->add(YCPString("allowVendorChange"),
YCPBoolean(zypp_ptr()->resolver()->allowVendorChange()));
return ret;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-pkg-bindings-3.1.24/src/ServiceManager.cc
new/yast2-pkg-bindings-3.1.26/src/ServiceManager.cc
--- old/yast2-pkg-bindings-3.1.24/src/ServiceManager.cc 2015-06-11
11:10:27.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.26/src/ServiceManager.cc 2015-06-22
10:45:28.000000000 +0200
@@ -24,6 +24,7 @@
#include "ServiceManager.h"
#include <zypp/RepoManager.h>
+#include <zypp/PathInfo.h>
#include <y2util/Y2SLog.h>
ServiceManager::ServiceManager() : _services_loaded(false)
@@ -56,23 +57,32 @@
void ServiceManager::SaveServices(zypp::RepoManager &repomgr)
{
- for_ (it, _known_services.begin(), _known_services.end())
+ for (PkgServices::iterator it = _known_services.begin(); it !=
_known_services.end();)
{
- // delete
- if (it->second.isDeleted())
- {
- std::string alias(it->second.alias());
- y2milestone("Removing service %s", alias.c_str());
- repomgr.removeService(alias);
- }
+ if (it->second.isDeleted())
+ {
+ std::string alias(it->second.alias());
+
+ zypp::ServiceInfo info = repomgr.getService(alias);
+ // check if the service file exists to avoid raising an exception
+ if (zypp::PathInfo(info.filepath()).isExist())
+ {
+ y2milestone("Removing service %s", alias.c_str());
+ repomgr.removeService(alias);
+ }
+
+ // erase the removed service, not needed anymore after the final
removal
+ _known_services.erase(it++);
+ }
+ else
+ {
+ ++it;
+ }
}
for_ (it, _known_services.begin(), _known_services.end())
{
- if (!it->second.isDeleted())
- {
- SavePkgService(it->second, repomgr);
- }
+ SavePkgService(it->second, repomgr);
}
}