Hello community, here is the log from the commit of package yast2-pkg-bindings for openSUSE:Factory checked in at 2017-06-28 10:33:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-pkg-bindings (Old) and /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-pkg-bindings" Wed Jun 28 10:33:35 2017 rev:190 rq:505501 version:3.2.4 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-pkg-bindings/yast2-pkg-bindings.changes 2017-06-05 18:48:38.431608565 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new/yast2-pkg-bindings.changes 2017-06-28 10:33:39.949621716 +0200 @@ -1,0 +2,6 @@ +Wed Jun 21 12:16:39 UTC 2017 - lslezak@suse.cz + +- Do not crash when the repository URL is not defined (bsc#1043218) +- 3.2.4 + +------------------------------------------------------------------- Old: ---- yast2-pkg-bindings-3.2.3.tar.bz2 New: ---- yast2-pkg-bindings-3.2.4.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-pkg-bindings-devel-doc.spec ++++++ --- /var/tmp/diff_new_pack.j9HJyQ/_old 2017-06-28 10:33:41.129454798 +0200 +++ /var/tmp/diff_new_pack.j9HJyQ/_new 2017-06-28 10:33:41.129454798 +0200 @@ -17,7 +17,7 @@ Name: yast2-pkg-bindings-devel-doc -Version: 3.2.3 +Version: 3.2.4 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: yast2-pkg-bindings-%{version}.tar.bz2 ++++++ yast2-pkg-bindings.spec ++++++ --- /var/tmp/diff_new_pack.j9HJyQ/_old 2017-06-28 10:33:41.153451402 +0200 +++ /var/tmp/diff_new_pack.j9HJyQ/_new 2017-06-28 10:33:41.157450837 +0200 @@ -17,7 +17,7 @@ Name: yast2-pkg-bindings -Version: 3.2.3 +Version: 3.2.4 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-pkg-bindings-3.2.3.tar.bz2 -> yast2-pkg-bindings-3.2.4.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.2.3/package/yast2-pkg-bindings-devel-doc.spec new/yast2-pkg-bindings-3.2.4/package/yast2-pkg-bindings-devel-doc.spec --- old/yast2-pkg-bindings-3.2.3/package/yast2-pkg-bindings-devel-doc.spec 2017-06-02 10:47:52.094711532 +0200 +++ new/yast2-pkg-bindings-3.2.4/package/yast2-pkg-bindings-devel-doc.spec 2017-06-21 17:32:25.057598963 +0200 @@ -16,7 +16,7 @@ # Name: yast2-pkg-bindings-devel-doc -Version: 3.2.3 +Version: 3.2.4 Release: 0 License: GPL-2.0 Group: Documentation/HTML diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.2.3/package/yast2-pkg-bindings.changes new/yast2-pkg-bindings-3.2.4/package/yast2-pkg-bindings.changes --- old/yast2-pkg-bindings-3.2.3/package/yast2-pkg-bindings.changes 2017-06-02 10:47:52.094711532 +0200 +++ new/yast2-pkg-bindings-3.2.4/package/yast2-pkg-bindings.changes 2017-06-21 17:32:25.061598963 +0200 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Jun 21 12:16:39 UTC 2017 - lslezak@suse.cz + +- Do not crash when the repository URL is not defined (bsc#1043218) +- 3.2.4 + +------------------------------------------------------------------- Fri Jun 2 08:42:12 UTC 2017 - igonzalezsosa@suse.com - Fix pkgGpgCheck callback crashing when reporting SrcPackages diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.2.3/package/yast2-pkg-bindings.spec new/yast2-pkg-bindings-3.2.4/package/yast2-pkg-bindings.spec --- old/yast2-pkg-bindings-3.2.3/package/yast2-pkg-bindings.spec 2017-06-02 10:47:52.094711532 +0200 +++ new/yast2-pkg-bindings-3.2.4/package/yast2-pkg-bindings.spec 2017-06-21 17:32:25.061598963 +0200 @@ -17,7 +17,7 @@ Name: yast2-pkg-bindings -Version: 3.2.3 +Version: 3.2.4 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.2.3/src/Callbacks.cc new/yast2-pkg-bindings-3.2.4/src/Callbacks.cc --- old/yast2-pkg-bindings-3.2.3/src/Callbacks.cc 2017-06-02 10:41:07.190711532 +0200 +++ new/yast2-pkg-bindings-3.2.4/src/Callbacks.cc 2017-06-21 17:32:25.065598963 +0200 @@ -1464,14 +1464,7 @@ if (callback._set) { callback.addInt(_pkg_ref.logFindAlias(repo.alias())); - - std::string url; - if (repo.baseUrlsBegin() != repo.baseUrlsEnd()) - { - url = repo.baseUrlsBegin()->asString(); - } - - callback.addStr(url); + callback.addStr(repo.url().asString()); callback.addStr(task.name()); callback.evaluate(); @@ -1528,14 +1521,7 @@ { // search Yast source ID callback.addInt(_pkg_ref.logFindAlias(source.info().alias())); - - std::string url; - if (source.info().baseUrlsBegin() != source.info().baseUrlsEnd()) - { - url = source.info().baseUrlsBegin()->asString(); - } - - callback.addStr(url); + callback.addStr(source.info().url().asString()); callback.addSymbol(SrcReportErrorAsString(error)); callback.addStr(description); @@ -1564,14 +1550,7 @@ { // search Yast source ID callback.addInt(_pkg_ref.logFindAlias(source.info().alias())); - - std::string url; - if (source.info().baseUrlsBegin() != source.info().baseUrlsEnd()) - { - url = source.info().baseUrlsBegin()->asString(); - } - callback.addStr(url); - + callback.addStr(source.info().url().asString()); callback.addStr(task); callback.addSymbol(SrcReportErrorAsString(error)); callback.addStr(reason); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.2.3/src/Package.cc new/yast2-pkg-bindings-3.2.4/src/Package.cc --- old/yast2-pkg-bindings-3.2.3/src/Package.cc 2017-06-02 10:41:07.194711532 +0200 +++ new/yast2-pkg-bindings-3.2.4/src/Package.cc 2017-06-21 17:32:25.069598963 +0200 @@ -230,11 +230,7 @@ y2warning("Name of repository '%lld' is empty, using URL", index); // use URL as the product name - std::string name; - if ((*repoit)->repoInfo().baseUrlsBegin() != (*repoit)->repoInfo().baseUrlsEnd()) - { - name = (*repoit)->repoInfo().baseUrlsBegin()->asString(); - } + std::string name((*repoit)->repoInfo().url().asString()); // use alias if url is unknown if (name.empty()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.2.3/src/Source_Create.cc new/yast2-pkg-bindings-3.2.4/src/Source_Create.cc --- old/yast2-pkg-bindings-3.2.3/src/Source_Create.cc 2017-06-02 10:41:07.198711532 +0200 +++ new/yast2-pkg-bindings-3.2.4/src/Source_Create.cc 2017-06-21 17:32:25.073598963 +0200 @@ -302,7 +302,7 @@ y2milestone("Added source '%s': '%s', enabled: %s, autorefresh: %s", repo.alias().c_str(), - repo.baseUrlsBegin()->asString().c_str(), + repo.url().asString().c_str(), repo.enabled() ? "true" : "false", repo.autorefresh() ? "true" : "false" ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.2.3/src/Source_Get.cc new/yast2-pkg-bindings-3.2.4/src/Source_Get.cc --- old/yast2-pkg-bindings-3.2.3/src/Source_Get.cc 2017-06-02 10:41:07.198711532 +0200 +++ new/yast2-pkg-bindings-3.2.4/src/Source_Get.cc 2017-06-21 17:32:25.073598963 +0200 @@ -283,9 +283,9 @@ y2warning("Pkg::SourceMediaData() doesn't return \"media_id\" and \"media_vendor\" values anymore."); // SourceMediaData returns URLs without password - if (repo->repoInfo().baseUrlsBegin() != repo->repoInfo().baseUrlsEnd()) + if (!repo->repoInfo().baseUrlsEmpty()) { - data->add( YCPString("url"), YCPString(repo->repoInfo().baseUrlsBegin()->asString())); + data->add( YCPString("url"), YCPString(repo->repoInfo().url().asString())); // add all base URLs YCPList base_urls; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.2.3/src/Source_Load.cc new/yast2-pkg-bindings-3.2.4/src/Source_Load.cc --- old/yast2-pkg-bindings-3.2.3/src/Source_Load.cc 2017-06-02 10:41:07.198711532 +0200 +++ new/yast2-pkg-bindings-3.2.4/src/Source_Load.cc 2017-06-21 17:32:25.077598963 +0200 @@ -267,8 +267,14 @@ // do not autorefresh remote repositories when the network is not running if (!network_is_running) { - zypp::Url url = *((*it)->repoInfo().baseUrlsBegin()); - + if ((*it)->repoInfo().baseUrlsEmpty()) + { + y2warning("No URL defined, skipping repository '%s'", (*it)->repoInfo().alias().c_str()); + continue; + } + + zypp::Url url = (*it)->repoInfo().url(); + if (remoteRepo(url)) { y2warning("No network connection, skipping autorefresh of remote repository %s (%s)", @@ -286,11 +292,17 @@ refresh_started_called = true; } - zypp::RepoManager::RefreshCheckStatus ref_stat = repomanager->checkIfToRefreshMetadata((*it)->repoInfo(), *((*it)->repoInfo().baseUrlsBegin())); + if ((*it)->repoInfo().baseUrlsEmpty()) + { + y2milestone("Skipping repository '%s' - URL not defined", (*it)->repoInfo().alias().c_str()); + continue; + } + + zypp::RepoManager::RefreshCheckStatus ref_stat = repomanager->checkIfToRefreshMetadata((*it)->repoInfo(), (*it)->repoInfo().url()); if (ref_stat != zypp::RepoManager::REFRESH_NEEDED) { - y2internal("Skipping repository '%s' - refresh is not needed", (*it)->repoInfo().alias().c_str()); + y2milestone("Skipping repository '%s' - refresh is not needed", (*it)->repoInfo().alias().c_str()); continue; } @@ -478,7 +490,7 @@ stages.push_back(_("Refresh Sources")); stages.push_back(_("Rebuild Cache")); stages.push_back(_("Load Data")); - + // 3 steps per repository (download, cache rebuild, load resolvables) pkgprogress.Start(_("Loading the Package Manager..."), stages, _(HelpTexts::load_resolvables)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.2.3/src/Source_Resolvables.cc new/yast2-pkg-bindings-3.2.4/src/Source_Resolvables.cc --- old/yast2-pkg-bindings-3.2.3/src/Source_Resolvables.cc 2017-06-02 10:41:07.198711532 +0200 +++ new/yast2-pkg-bindings-3.2.4/src/Source_Resolvables.cc 2017-06-21 17:32:25.077598963 +0200 @@ -71,7 +71,7 @@ prog.sendTo(progressrcv); zypp::CombinedProgressData load_subprogress(prog, 100); - try + try { zypp::RepoManager* repomanager = CreateRepoManager(); bool refresh = true; @@ -84,15 +84,23 @@ { if (network_check) { - zypp::Url url = *(repoinfo.baseUrlsBegin()); + if (repoinfo.baseUrlsEmpty()) + { + y2milestone("No URL defined, skipping repository '%s'", repoinfo.alias().c_str()); + refresh = false; + } + else + { + zypp::Url url = repoinfo.url(); - if (remoteRepo(url) && !NetworkDetected()) - { - y2warning("No network connection, skipping autorefresh of remote repository %s (%s)", - repoinfo.alias().c_str(), url.asString().c_str()); + if (remoteRepo(url) && !NetworkDetected()) + { + y2warning("No network connection, skipping autorefresh of remote repository %s (%s)", + repoinfo.alias().c_str(), url.asString().c_str()); - refresh = false; - } + refresh = false; + } + } } if (refresh) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.2.3/src/YRepo.cc new/yast2-pkg-bindings-3.2.4/src/YRepo.cc --- old/yast2-pkg-bindings-3.2.3/src/YRepo.cc 2017-06-02 10:41:07.202711532 +0200 +++ new/yast2-pkg-bindings-3.2.4/src/YRepo.cc 2017-06-21 17:32:25.077598963 +0200 @@ -52,8 +52,8 @@ if (!_maccess) { y2milestone("Creating new MediaSetAccess for url %s", - (*_repo.baseUrlsBegin()).asString().c_str()); - _maccess = new zypp::MediaSetAccess(_repo.name(), *_repo.baseUrlsBegin()); // FIXME handle multiple baseUrls + _repo.url().asString().c_str()); + _maccess = new zypp::MediaSetAccess(_repo.name(), _repo.url()); // FIXME handle multiple baseUrls } return _maccess;