Hello community,
here is the log from the commit of package yast2-pkg-bindings for
openSUSE:Factory checked in at 2018-02-16 21:41:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-pkg-bindings (Old)
and /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-pkg-bindings"
Fri Feb 16 21:41:37 2018 rev:197 rq:577174 version:4.0.9
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-pkg-bindings/yast2-pkg-bindings.changes
2018-02-02 22:18:36.876148892 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new/yast2-pkg-bindings.changes
2018-02-16 21:41:38.213655965 +0100
@@ -1,0 +2,15 @@
+Fri Feb 16 08:01:39 UTC 2018 - [email protected]
+
+- always scan media for products to allow media identification
+ (bsc#1080983)
+- 4.0.9
+
+-------------------------------------------------------------------
+Mon Feb 12 15:30:32 UTC 2018 - [email protected]
+
+- Add a PrdLicenseLocales function to get the list of available
+ license translations for a given product (related to
+ FATE#322276).
+- 4.0.8
+
+-------------------------------------------------------------------
Old:
----
yast2-pkg-bindings-4.0.7.tar.bz2
New:
----
yast2-pkg-bindings-4.0.9.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.tfnUms/_old 2018-02-16 21:41:38.869632307 +0100
+++ /var/tmp/diff_new_pack.tfnUms/_new 2018-02-16 21:41:38.873632164 +0100
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings-devel-doc
-Version: 4.0.7
+Version: 4.0.9
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: yast2-pkg-bindings-%{version}.tar.bz2
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.tfnUms/_old 2018-02-16 21:41:38.893631442 +0100
+++ /var/tmp/diff_new_pack.tfnUms/_new 2018-02-16 21:41:38.897631298 +0100
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings
-Version: 4.0.7
+Version: 4.0.9
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-pkg-bindings-4.0.7.tar.bz2 -> yast2-pkg-bindings-4.0.9.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-pkg-bindings-4.0.7/package/yast2-pkg-bindings-devel-doc.spec
new/yast2-pkg-bindings-4.0.9/package/yast2-pkg-bindings-devel-doc.spec
--- old/yast2-pkg-bindings-4.0.7/package/yast2-pkg-bindings-devel-doc.spec
2018-01-31 14:50:17.000000000 +0100
+++ new/yast2-pkg-bindings-4.0.9/package/yast2-pkg-bindings-devel-doc.spec
2018-02-16 09:22:49.000000000 +0100
@@ -16,7 +16,7 @@
#
Name: yast2-pkg-bindings-devel-doc
-Version: 4.0.7
+Version: 4.0.9
Release: 0
License: GPL-2.0
Group: Documentation/HTML
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-pkg-bindings-4.0.7/package/yast2-pkg-bindings.changes
new/yast2-pkg-bindings-4.0.9/package/yast2-pkg-bindings.changes
--- old/yast2-pkg-bindings-4.0.7/package/yast2-pkg-bindings.changes
2018-01-31 14:50:17.000000000 +0100
+++ new/yast2-pkg-bindings-4.0.9/package/yast2-pkg-bindings.changes
2018-02-16 09:22:49.000000000 +0100
@@ -1,4 +1,19 @@
-------------------------------------------------------------------
+Fri Feb 16 08:01:39 UTC 2018 - [email protected]
+
+- always scan media for products to allow media identification
+ (bsc#1080983)
+- 4.0.9
+
+-------------------------------------------------------------------
+Mon Feb 12 15:30:32 UTC 2018 - [email protected]
+
+- Add a PrdLicenseLocales function to get the list of available
+ license translations for a given product (related to
+ FATE#322276).
+- 4.0.8
+
+-------------------------------------------------------------------
Wed Jan 31 12:51:57 UTC 2018 - [email protected]
- Added "transact_by" key to the PkgPropertiesAll call
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-pkg-bindings-4.0.7/package/yast2-pkg-bindings.spec
new/yast2-pkg-bindings-4.0.9/package/yast2-pkg-bindings.spec
--- old/yast2-pkg-bindings-4.0.7/package/yast2-pkg-bindings.spec
2018-01-31 14:50:17.000000000 +0100
+++ new/yast2-pkg-bindings-4.0.9/package/yast2-pkg-bindings.spec
2018-02-16 09:22:49.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings
-Version: 4.0.7
+Version: 4.0.9
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-pkg-bindings-4.0.7/src/Package.cc
new/yast2-pkg-bindings-4.0.9/src/Package.cc
--- old/yast2-pkg-bindings-4.0.7/src/Package.cc 2018-01-31 14:50:17.000000000
+0100
+++ new/yast2-pkg-bindings-4.0.9/src/Package.cc 2018-02-16 09:22:49.000000000
+0100
@@ -50,6 +50,7 @@
#include <zypp/ZYppFactory.h>
#include <zypp/repo/PackageProvider.h>
#include <zypp/Locale.h>
+#include <zypp/RepoInfo.h>
#include <fstream>
#include <sstream>
@@ -2841,6 +2842,38 @@
return YCPBoolean(selectable->hasLicenceConfirmed());
}
+/**
+ * @builtin PrdLicenseLocales
+ *
+ * @short List of available translations
+ * @param string name of a product
+ * @return YCPValue list of available translations or YCPVoid if the product
is not found.
+ */
+YCPValue
+PkgFunctions::PrdLicenseLocales(const YCPString& product)
+{
+ zypp::ui::Selectable::Ptr selectable =
find_selectable_product(product->value());
+ YCPList langycplist;
+
+ if (!selectable)
+ return YCPVoid();
+
+ const zypp::RepoInfo & repoinfo(selectable->candidateObj().repoInfo());
+ zypp::LocaleSet lset;
+
+ if (repoinfo.hasLicense(product->value())) {
+ lset = repoinfo.getLicenseLocales(product->value());
+ } else if (repoinfo.hasLicense()) {
+ lset = repoinfo.getLicenseLocales();
+ } else
+ return langycplist;
+
+ for (zypp::LocaleSet::const_iterator it = lset.begin(); it != lset.end();
++it)
+ {
+ langycplist->add(YCPString(it->code()));
+ }
+ return langycplist;
+}
/****************************************************************************************
* @builtin RpmChecksig
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-pkg-bindings-4.0.7/src/PkgFunctions.h
new/yast2-pkg-bindings-4.0.9/src/PkgFunctions.h
--- old/yast2-pkg-bindings-4.0.7/src/PkgFunctions.h 2018-01-31
14:50:17.000000000 +0100
+++ new/yast2-pkg-bindings-4.0.9/src/PkgFunctions.h 2018-02-16
09:22:49.000000000 +0100
@@ -744,6 +744,8 @@
YCPValue PrdNeedToAcceptLicense (const YCPString& product);
/* TYPEINFO: boolean(string)*/
YCPValue PrdHasLicenseConfirmed(const YCPString& product);
+ /* TYPEINFO: list<string>(string)*/
+ YCPValue PrdLicenseLocales(const YCPString& product);
/* TYPEINFO: boolean(string)*/
YCPBoolean RpmChecksig( const YCPString & filename );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-pkg-bindings-4.0.7/src/Source_Create.cc
new/yast2-pkg-bindings-4.0.9/src/Source_Create.cc
--- old/yast2-pkg-bindings-4.0.7/src/Source_Create.cc 2018-01-31
14:50:17.000000000 +0100
+++ new/yast2-pkg-bindings-4.0.9/src/Source_Create.cc 2018-02-16
09:22:49.000000000 +0100
@@ -575,11 +575,8 @@
PkgProgress pkgprogress(_callbackHandler);
std::list<std::string> stages;
- // display the scan stage only when needed
- if (scan)
- {
- stages.push_back(_("Search Available Products"));
- }
+ // always scan products - to set the repo alias
+ stages.push_back(_("Search Available Products"));
if (source_type->value().empty())
{
@@ -692,9 +689,31 @@
zypp::CombinedProgressData subprogrcv_create(prg, 80);
zypp::CombinedProgressData subprogrcv_load(prg, 20);
+ zypp::MediaProductSet products;
+ std::string alias = "";
+
+ try {
+ ScanProductsWithCallBacks(url);
+ products = available_products;
+ for( zypp::MediaProductSet::const_iterator it = products.begin();
+ it != products.end() ; ++it )
+ {
+ if(it->_dir == pn)
+ {
+ alias = it->_name;
+ zypp::str::replaceAll(alias, " ", "-");
+ }
+ }
+ }
+ catch ( const zypp::Exception& excpt)
+ {
+ // only warning, we still can use the repo from specified dir with
generated alias
+ y2warning( "Cannot read the product list from the media" );
+ }
+
try
{
- RepoId new_id = createManagedSource(url, pn, type, "", pkgprogress,
subprogrcv_create);
+ RepoId new_id = createManagedSource(url, pn, type, alias, pkgprogress,
subprogrcv_create);
new_repos.push_back(new_id);
if (!scan_only)