Hello community,
here is the log from the commit of package yast2-pkg-bindings for
openSUSE:Factory checked in at 2020-10-18 16:20:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-pkg-bindings (Old)
and /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new.3486 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-pkg-bindings"
Sun Oct 18 16:20:41 2020 rev:213 rq:840430 version:4.3.3
Changes:
--------
---
/work/SRC/openSUSE:Factory/yast2-pkg-bindings/yast2-pkg-bindings-devel-doc.changes
2018-11-01 19:12:53.050042375 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new.3486/yast2-pkg-bindings-devel-doc.changes
2020-10-18 16:20:47.044473807 +0200
@@ -1,0 +2,6 @@
+Thu Sep 17 11:37:48 CEST 2020 - [email protected]
+
+- Added new call Pkg::SetAdditionalVendors (jsc#SLE-14807).
+- 4.3.3
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/yast2-pkg-bindings/yast2-pkg-bindings.changes
2020-09-03 01:09:32.200374636 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new.3486/yast2-pkg-bindings.changes
2020-10-18 16:20:47.564474039 +0200
@@ -1,0 +2,20 @@
+Mon Oct 5 08:27:39 UTC 2020 - [email protected]
+
+- Added new call Pkg::SetAdditionalVendors (jsc#SLE-15184).
+- 4.3.3
+
+-------------------------------------------------------------------
+Mon Oct 5 07:27:39 UTC 2020 - Ladislav Slezák <[email protected]>
+
+- Return "nil" when a product package is not defined, missing
+ value might cause a crash (bsc#1175681)
+- 4.3.2
+
+-------------------------------------------------------------------
+Fri Sep 25 07:54:14 UTC 2020 - Ladislav Slezák <[email protected]>
+
+- Fixed migration from SLE-HPC-12 with activated HPC module to
+ SLE15-SP2 (fixed saving service files) (bsc#1171977)
+- 4.3.1
+
+-------------------------------------------------------------------
Old:
----
yast2-pkg-bindings-4.3.0.tar.bz2
New:
----
yast2-pkg-bindings-4.3.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.81XDQi/_old 2020-10-18 16:20:48.256474347 +0200
+++ /var/tmp/diff_new_pack.81XDQi/_new 2020-10-18 16:20:48.260474348 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings-devel-doc
-Version: 4.3.0
+Version: 4.3.3
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: yast2-pkg-bindings-%{version}.tar.bz2
@@ -28,7 +28,8 @@
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: libxslt
-BuildRequires: libzypp-devel >= 14.29.0
+# zypp::VendorAttr API
+BuildRequires: libzypp-devel >= 17.25.0
BuildRequires: yast2-core-devel
BuildRequires: yast2-devtools >= 3.1.10
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.81XDQi/_old 2020-10-18 16:20:48.284474359 +0200
+++ /var/tmp/diff_new_pack.81XDQi/_new 2020-10-18 16:20:48.288474361 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings
-Version: 4.3.0
+Version: 4.3.3
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -27,7 +27,8 @@
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: libxslt
-BuildRequires: libzypp-devel >= 14.29.0
+# zypp::VendorAttr API
+BuildRequires: libzypp-devel >= 17.25.0
BuildRequires: yast2-core-devel
BuildRequires: yast2-devtools >= 3.1.10
++++++ yast2-pkg-bindings-4.3.0.tar.bz2 -> yast2-pkg-bindings-4.3.3.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-pkg-bindings-4.3.0/package/yast2-pkg-bindings-devel-doc.changes
new/yast2-pkg-bindings-4.3.3/package/yast2-pkg-bindings-devel-doc.changes
--- old/yast2-pkg-bindings-4.3.0/package/yast2-pkg-bindings-devel-doc.changes
2020-08-25 10:48:45.000000000 +0200
+++ new/yast2-pkg-bindings-4.3.3/package/yast2-pkg-bindings-devel-doc.changes
2020-10-09 15:14:14.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Sep 17 11:37:48 CEST 2020 - [email protected]
+
+- Added new call Pkg::SetAdditionalVendors (jsc#SLE-14807).
+- 4.3.3
+
+-------------------------------------------------------------------
Fri Aug 17 15:33:34 CEST 2018 - [email protected]
- Switched license in spec file from SPDX2 to SPDX3 format.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-pkg-bindings-4.3.0/package/yast2-pkg-bindings-devel-doc.spec
new/yast2-pkg-bindings-4.3.3/package/yast2-pkg-bindings-devel-doc.spec
--- old/yast2-pkg-bindings-4.3.0/package/yast2-pkg-bindings-devel-doc.spec
2020-08-25 10:48:45.000000000 +0200
+++ new/yast2-pkg-bindings-4.3.3/package/yast2-pkg-bindings-devel-doc.spec
2020-10-09 15:14:14.000000000 +0200
@@ -16,7 +16,7 @@
#
Name: yast2-pkg-bindings-devel-doc
-Version: 4.3.0
+Version: 4.3.3
Release: 0
License: GPL-2.0-only
Group: Documentation/HTML
@@ -29,7 +29,8 @@
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: libxslt
-BuildRequires: libzypp-devel >= 14.29.0
+# zypp::VendorAttr API
+BuildRequires: libzypp-devel >= 17.25.0
BuildRequires: yast2-core-devel
BuildRequires: yast2-devtools >= 3.1.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-pkg-bindings-4.3.0/package/yast2-pkg-bindings.changes
new/yast2-pkg-bindings-4.3.3/package/yast2-pkg-bindings.changes
--- old/yast2-pkg-bindings-4.3.0/package/yast2-pkg-bindings.changes
2020-08-25 10:48:45.000000000 +0200
+++ new/yast2-pkg-bindings-4.3.3/package/yast2-pkg-bindings.changes
2020-10-09 15:14:14.000000000 +0200
@@ -1,4 +1,24 @@
-------------------------------------------------------------------
+Mon Oct 5 08:27:39 UTC 2020 - [email protected]
+
+- Added new call Pkg::SetAdditionalVendors (jsc#SLE-15184).
+- 4.3.3
+
+-------------------------------------------------------------------
+Mon Oct 5 07:27:39 UTC 2020 - Ladislav Slezák <[email protected]>
+
+- Return "nil" when a product package is not defined, missing
+ value might cause a crash (bsc#1175681)
+- 4.3.2
+
+-------------------------------------------------------------------
+Fri Sep 25 07:54:14 UTC 2020 - Ladislav Slezák <[email protected]>
+
+- Fixed migration from SLE-HPC-12 with activated HPC module to
+ SLE15-SP2 (fixed saving service files) (bsc#1171977)
+- 4.3.1
+
+-------------------------------------------------------------------
Mon Aug 24 11:53:42 UTC 2020 - Ladislav Slezák <[email protected]>
- Improved Pkg::Resolvables() call to allow filtering by RPM
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-pkg-bindings-4.3.0/package/yast2-pkg-bindings.spec
new/yast2-pkg-bindings-4.3.3/package/yast2-pkg-bindings.spec
--- old/yast2-pkg-bindings-4.3.0/package/yast2-pkg-bindings.spec
2020-08-25 10:48:45.000000000 +0200
+++ new/yast2-pkg-bindings-4.3.3/package/yast2-pkg-bindings.spec
2020-10-09 15:14:14.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings
-Version: 4.3.0
+Version: 4.3.3
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -30,7 +30,8 @@
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: libxslt
-BuildRequires: libzypp-devel >= 14.29.0
+# zypp::VendorAttr API
+BuildRequires: libzypp-devel >= 17.25.0
BuildRequires: yast2-core-devel
BuildRequires: yast2-devtools >= 3.1.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-pkg-bindings-4.3.0/src/Package.cc
new/yast2-pkg-bindings-4.3.3/src/Package.cc
--- old/yast2-pkg-bindings-4.3.0/src/Package.cc 2020-08-25 10:48:45.000000000
+0200
+++ new/yast2-pkg-bindings-4.3.3/src/Package.cc 2020-10-09 15:14:14.000000000
+0200
@@ -51,6 +51,7 @@
#include <zypp/repo/PackageProvider.h>
#include <zypp/Locale.h>
#include <zypp/RepoInfo.h>
+#include <zypp/VendorAttr.h>
#include <fstream>
#include <sstream>
@@ -1963,6 +1964,57 @@
return ret;
}
+/**
+ * @builtin SetAdditionalVendors
+ *
+ * @short set additional vendors which are compatible
+ * @description
+ * Select additional compatible vendors for upgrade.
+ * @param list<string> List of additional vendor strings
+ * @return void
+ * @usage Pkg::SetAdditionalLocales(["openSUSE","SUSE LLC"]);
+ */
+YCPValue
+PkgFunctions::SetAdditionalVendors (const YCPList &vendorycplist)
+{
+ int i = 0;
+ zypp::VendorAttr::VendorList vendors;
+ while (i < vendorycplist->size())
+ {
+ if (vendorycplist->value(i)->isString())
+ {
+ vendors.push_back(vendorycplist->value(i)->asString()->value());
+ }
+ else
+ {
+ y2error("Pkg::SetAdditionalVendors ([...,%s,...]) not string",
vendorycplist->value(i)->toString().c_str());
+ }
+ i++;
+ }
+
+ try
+ {
+ if ( zypp_ptr()->getTarget() ) {
+ zypp::VendorAttr vendorAttr { zypp_ptr()->getTarget()->vendorAttr() };
+ vendorAttr.addVendorList(vendors);
+ zypp_ptr()->getTarget()->vendorAttr( std::move(vendorAttr) );
+ }
+ else {
+ zypp::VendorAttr::noTargetInstance().addVendorList(vendors);
+ }
+ }
+
+ catch (const zypp::Exception& ex)
+ {
+ y2error("An error occurred during Pkg::SetAdditionalVendors");
+ _last_error.setLastError(ExceptionAsString(ex));
+ return YCPBoolean(false);
+ }
+
+ return YCPBoolean(true);
+}
+
+
/**
@builtin PkgSolve
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-pkg-bindings-4.3.0/src/PkgFunctions.h
new/yast2-pkg-bindings-4.3.3/src/PkgFunctions.h
--- old/yast2-pkg-bindings-4.3.0/src/PkgFunctions.h 2020-08-25
10:48:45.000000000 +0200
+++ new/yast2-pkg-bindings-4.3.3/src/PkgFunctions.h 2020-10-09
15:14:14.000000000 +0200
@@ -686,6 +686,8 @@
YCPValue GetSolverFlags();
/* TYPEINFO: boolean(map<string,any>)*/
YCPValue SetSolverFlags(const YCPMap& params);
+ /* TYPEINFO: boolean(list<string>) */
+ YCPValue SetAdditionalVendors (const YCPList &args);
/* TYPEINFO: boolean(boolean)*/
YCPBoolean PkgSolve (const YCPBoolean& filter);
/* TYPEINFO: boolean(string)*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-pkg-bindings-4.3.0/src/Resolvable_Properties.cc
new/yast2-pkg-bindings-4.3.3/src/Resolvable_Properties.cc
--- old/yast2-pkg-bindings-4.3.0/src/Resolvable_Properties.cc 2020-08-25
10:48:45.000000000 +0200
+++ new/yast2-pkg-bindings-4.3.3/src/Resolvable_Properties.cc 2020-10-09
15:14:14.000000000 +0200
@@ -428,31 +428,45 @@
std::string product_file;
// add reference file in /etc/products.d
- if (status.isInstalled() && (all ||
attrs->contains(YCPSymbol("upgrades"))))
+ if (all || attrs->contains(YCPSymbol("upgrades")))
{
- product_file = (_target_root + "/etc/products.d/" +
product->referenceFilename()).asString();
- y2milestone("Parsing product file %s",
product_file.c_str());
- const zypp::parser::ProductFileData productFileData =
zypp::parser::ProductFileReader::scanFile(product_file);
+ if (status.isInstalled())
+ {
+ product_file = (_target_root +
"/etc/products.d/" + product->referenceFilename()).asString();
+ y2milestone("Parsing product file %s",
product_file.c_str());
+ const zypp::parser::ProductFileData
productFileData = zypp::parser::ProductFileReader::scanFile(product_file);
- YCPList upgrade_list;
+ YCPList upgrade_list;
- for (const auto &upgrade : productFileData.upgrades())
- {
- YCPMap upgrades;
- upgrades->add(YCPString("name"),
YCPString(upgrade.name()));
- upgrades->add(YCPString("summary"),
YCPString(upgrade.summary()));
- upgrades->add(YCPString("repository"),
YCPString(upgrade.repository()));
- upgrades->add(YCPString("notify"),
YCPBoolean(upgrade.notify()));
- upgrades->add(YCPString("status"),
YCPString(upgrade.status()));
- upgrades->add(YCPString("product"),
YCPString(upgrade.product()));
+ for (const auto &upgrade :
productFileData.upgrades())
+ {
+ YCPMap upgrades;
+ upgrades->add(YCPString("name"),
YCPString(upgrade.name()));
+ upgrades->add(YCPString("summary"),
YCPString(upgrade.summary()));
+ upgrades->add(YCPString("repository"),
YCPString(upgrade.repository()));
+ upgrades->add(YCPString("notify"),
YCPBoolean(upgrade.notify()));
+ upgrades->add(YCPString("status"),
YCPString(upgrade.status()));
+ upgrades->add(YCPString("product"),
YCPString(upgrade.product()));
- upgrade_list->add(upgrades);
- }
+ upgrade_list->add(upgrades);
+ }
- info->add(YCPString("upgrades"), upgrade_list);
+ info->add(YCPString("upgrades"), upgrade_list);
+ }
+ else if (attrs->contains(YCPSymbol("upgrades")))
+ {
+ info->add(YCPString("upgrades"), YCPVoid());
+ }
}
- else
+
+ if (all || attrs->contains(YCPSymbol("product_package")))
{
+ // pre-set the default value (nil) if the attribute is
requested
+ if (attrs->contains(YCPSymbol("product_package")))
+ {
+ info->add(YCPString("product_package"),
YCPVoid());
+ }
+
// get the package
zypp::sat::Solvable refsolvable =
product->referencePackage();
@@ -482,7 +496,7 @@
}
}
}
- }
+ }
}
if (all || attrs->contains(YCPSymbol("product_file")))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-pkg-bindings-4.3.0/src/ServiceManager.cc
new/yast2-pkg-bindings-4.3.3/src/ServiceManager.cc
--- old/yast2-pkg-bindings-4.3.0/src/ServiceManager.cc 2020-08-25
10:48:45.000000000 +0200
+++ new/yast2-pkg-bindings-4.3.3/src/ServiceManager.cc 2020-10-09
15:14:14.000000000 +0200
@@ -19,6 +19,7 @@
*/
#include <ostream>
+#include <fstream>
#include "log.h"
#include "ServiceManager.h"
@@ -332,14 +333,21 @@
DBG << "Known Service: " << s_known << std::endl;
DBG << "Stored Service: " << s_stored << std::endl;
+ DBG << "orig_alias: " << orig_alias.c_str() << std::endl;
+ zypp::Pathname file_path = s_stored.filepath();
+ DBG << "Service file exists: " << zypp::PathInfo(file_path).isExist() <<
std::endl;
+
+ // already defined?
+ if (s_stored == zypp::ServiceInfo::noService)
+ {
+ // remove the file if it already exists
+ // (a corner case, the libzypp data is out of sync with the disk
content)
+ if (zypp::PathInfo(file_path).isExist())
+ {
+ MIL << "removing file " << file_path << std::endl;
+ zypp::filesystem::unlink(file_path);
+ }
- y2debug("orig_alias: %s", orig_alias.c_str());
-
- // already saved?
- // Checking if the service file still exists at all.
- if (s_stored == zypp::ServiceInfo::noService ||
- !zypp::PathInfo(s_stored.filepath()).isExist())
- {
y2milestone("Adding new service %s", alias.c_str());
// add the service
repomgr.addService(s_known);
@@ -348,6 +356,17 @@
}
else
{
+ // create the file if it is missing
+ // (a corner case, the libzypp data is out of sync with the disk
content)
+ if (!zypp::PathInfo(file_path).isExist())
+ {
+ MIL << "creating file " << file_path << std::endl;
+ std::ofstream srv_stream;
+ srv_stream.open(file_path.asString());
+ s_known.dumpAsIniOn(srv_stream);
+ srv_stream.close();
+ }
+
y2milestone("Saving service %s", alias.c_str());
// use the old alias
repomgr.modifyService(orig_alias, s_known);