Hello community, here is the log from the commit of package yast2-pkg-bindings for openSUSE:Factory checked in at 2020-07-24 09:53:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-pkg-bindings (Old) and /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new.3592 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-pkg-bindings" Fri Jul 24 09:53:19 2020 rev:211 rq:822277 version:4.2.9 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-pkg-bindings/yast2-pkg-bindings.changes 2020-07-15 11:19:11.997250937 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new.3592/yast2-pkg-bindings.changes 2020-07-24 09:54:19.525302451 +0200 @@ -1,0 +2,7 @@ +Wed Jul 22 16:02:16 CEST 2020 - [email protected] + +- Expand URL when libzypp expects an expanded URL. Fixes weird zypp + repository name generated during installation. (bsc#1173509) +- 4.2.9 + +------------------------------------------------------------------- Old: ---- yast2-pkg-bindings-4.2.8.tar.bz2 New: ---- yast2-pkg-bindings-4.2.9.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-pkg-bindings-devel-doc.spec ++++++ --- /var/tmp/diff_new_pack.W1PJS0/_old 2020-07-24 09:54:21.801304827 +0200 +++ /var/tmp/diff_new_pack.W1PJS0/_new 2020-07-24 09:54:21.805304830 +0200 @@ -17,7 +17,7 @@ Name: yast2-pkg-bindings-devel-doc -Version: 4.2.8 +Version: 4.2.9 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: yast2-pkg-bindings-%{version}.tar.bz2 ++++++ yast2-pkg-bindings.spec ++++++ --- /var/tmp/diff_new_pack.W1PJS0/_old 2020-07-24 09:54:21.825304851 +0200 +++ /var/tmp/diff_new_pack.W1PJS0/_new 2020-07-24 09:54:21.825304851 +0200 @@ -17,7 +17,7 @@ Name: yast2-pkg-bindings -Version: 4.2.8 +Version: 4.2.9 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-pkg-bindings-4.2.8.tar.bz2 -> yast2-pkg-bindings-4.2.9.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-4.2.8/package/yast2-pkg-bindings-devel-doc.spec new/yast2-pkg-bindings-4.2.9/package/yast2-pkg-bindings-devel-doc.spec --- old/yast2-pkg-bindings-4.2.8/package/yast2-pkg-bindings-devel-doc.spec 2020-07-13 13:17:22.000000000 +0200 +++ new/yast2-pkg-bindings-4.2.9/package/yast2-pkg-bindings-devel-doc.spec 2020-07-22 16:41:34.000000000 +0200 @@ -16,7 +16,7 @@ # Name: yast2-pkg-bindings-devel-doc -Version: 4.2.8 +Version: 4.2.9 Release: 0 License: GPL-2.0-only Group: Documentation/HTML diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-4.2.8/package/yast2-pkg-bindings.changes new/yast2-pkg-bindings-4.2.9/package/yast2-pkg-bindings.changes --- old/yast2-pkg-bindings-4.2.8/package/yast2-pkg-bindings.changes 2020-07-13 13:17:22.000000000 +0200 +++ new/yast2-pkg-bindings-4.2.9/package/yast2-pkg-bindings.changes 2020-07-22 16:41:34.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Jul 22 16:02:16 CEST 2020 - [email protected] + +- Expand URL when libzypp expects an expanded URL. Fixes weird zypp + repository name generated during installation. (bsc#1173509) +- 4.2.9 + +------------------------------------------------------------------- Fri Jul 10 09:24:53 CEST 2020 - [email protected] - Extensions to handle raw repository name (bsc#1172477) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-4.2.8/package/yast2-pkg-bindings.spec new/yast2-pkg-bindings-4.2.9/package/yast2-pkg-bindings.spec --- old/yast2-pkg-bindings-4.2.8/package/yast2-pkg-bindings.spec 2020-07-13 13:17:22.000000000 +0200 +++ new/yast2-pkg-bindings-4.2.9/package/yast2-pkg-bindings.spec 2020-07-22 16:41:34.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-pkg-bindings -Version: 4.2.8 +Version: 4.2.9 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-4.2.8/src/PkgFunctions.cc new/yast2-pkg-bindings-4.2.9/src/PkgFunctions.cc --- old/yast2-pkg-bindings-4.2.8/src/PkgFunctions.cc 2020-07-13 13:17:22.000000000 +0200 +++ new/yast2-pkg-bindings-4.2.9/src/PkgFunctions.cc 2020-07-22 16:41:34.000000000 +0200 @@ -516,9 +516,15 @@ return YCPVoid(); } + return YCPString(ExpandedName(name->value())); +} + + +string PkgFunctions::ExpandedName(const string& name) const +{ zypp::RepoVariablesReplacedString replaced_name; - replaced_name.raw() = name->value(); - return YCPString(replaced_name.transformed()); + replaced_name.raw() = name; + return replaced_name.transformed(); } @@ -535,10 +541,16 @@ return YCPVoid(); } - zypp::RepoVariablesReplacedUrl replacedUrl; - replacedUrl.raw() = zypp::Url(url->value()); // return full URL including the password if present - return YCPString(replacedUrl.transformed().asCompleteString()); + return YCPString(ExpandedUrl(zypp::Url(url->value())).asCompleteString()); +} + + +zypp::Url PkgFunctions::ExpandedUrl(const zypp::Url& url) const +{ + zypp::RepoVariablesReplacedUrl replacedUrl; + replacedUrl.raw() = url; + return replacedUrl.transformed(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-4.2.8/src/PkgFunctions.h new/yast2-pkg-bindings-4.2.9/src/PkgFunctions.h --- old/yast2-pkg-bindings-4.2.8/src/PkgFunctions.h 2020-07-13 13:17:22.000000000 +0200 +++ new/yast2-pkg-bindings-4.2.9/src/PkgFunctions.h 2020-07-22 16:41:34.000000000 +0200 @@ -850,5 +850,9 @@ RepoId LastReportedRepo() const; int LastReportedMedium() const; void SetReportedSource(RepoId repo, int medium); + + string ExpandedName(const string&) const; + zypp::Url ExpandedUrl(const zypp::Url&) const; + }; #endif // PkgFunctions_h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-4.2.8/src/Source_Callbacks.cc new/yast2-pkg-bindings-4.2.9/src/Source_Callbacks.cc --- old/yast2-pkg-bindings-4.2.8/src/Source_Callbacks.cc 2020-07-13 13:17:22.000000000 +0200 +++ new/yast2-pkg-bindings-4.2.9/src/Source_Callbacks.cc 2020-07-22 16:41:34.000000000 +0200 @@ -19,7 +19,6 @@ */ /* - File: $Id$ Author: Ladislav Slezák <[email protected]> Summary: Callbacks functions related to repository registration Namespace: Pkg @@ -162,7 +161,7 @@ { // probe type of the repository zypp::RepoManager* repomanager = CreateRepoManager(); - repotype = repomanager->probe(url); + repotype = repomanager->probe(ExpandedUrl(url)); } catch(...) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-4.2.8/src/Source_Create.cc new/yast2-pkg-bindings-4.2.9/src/Source_Create.cc --- old/yast2-pkg-bindings-4.2.8/src/Source_Create.cc 2020-07-13 13:17:22.000000000 +0200 +++ new/yast2-pkg-bindings-4.2.9/src/Source_Create.cc 2020-07-22 16:41:34.000000000 +0200 @@ -62,7 +62,7 @@ try { available_products.clear(); - zypp::productsInMedia(url, available_products); + zypp::productsInMedia(ExpandedUrl(url), available_products); } catch(...) {
