#
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "12")
-SET(VERSION_PATCH "9")
+SET(VERSION_PATCH "11")
-# LAST RELEASED: 1.12.9
+# LAST RELEASED: 1.12.11
#=======
-------------------------------------------------------------------
+Thu Aug 13 17:07:10 CEST 2015 - ma@suse.de
+
+- Support caching of service metadata (FATE#318136)
+- BuildRequires: libzypp-devel >= 15.13.0
+- version 1.12.11
+
+-------------------------------------------------------------------
+Thu Aug 13 01:14:22 CEST 2015 - ma@suse.de
+
+- Update zypper-po.tar.bz2
+
+-------------------------------------------------------------------
+Mon Aug 10 17:01:04 CEST 2015 - ma@suse.de
+
+- Adapt to libzypp changes due to FATE#318778
+- BuildRequires: libzypp-devel >= 15.11.0
+- version 1.12.10
+
+-------------------------------------------------------------------
+Sun Aug 9 01:14:00 CEST 2015 - ma@suse.de
+
+- Update zypper-po.tar.bz2
+
+-------------------------------------------------------------------
+Thu Aug 6 01:14:06 CEST 2015 - ma@suse.de
+
+- Update zypper-po.tar.bz2
+
+-------------------------------------------------------------------
+Sun Aug 2 01:14:11 CEST 2015 - ma@suse.de
+
+- Update zypper-po.tar.bz2
+
+-------------------------------------------------------------------
Thu Jul 30 01:14:09 CEST 2015 - ma@suse.de
- Update zypper-po.tar.bz2
return str::form(
_("No update candidate for '%s'."
" The highest available version is already installed."),
- poolitem_user_string(_objinst).c_str());
+ _objinst.asString().c_str() );
else
return
str::form(_("No update candidate for '%s'."), _objinst->name().c_str());
return str::form(
_("There is an update candidate '%s' for '%s', but it does not match"
" the specified version, architecture, or repository."),
- poolitem_user_string(highest).c_str(),
- poolitem_user_string(_objinst).c_str());
+ highest.asString().c_str(),
+ _objinst.asString().c_str());
}
case UPD_CANDIDATE_CHANGES_VENDOR:
{
PoolItem highest = asSelectable()(_objinst)->highestAvailableVersionObj();
ostringstream cmdhint;
- cmdhint << "zypper install " << poolitem_user_string(highest);
+ cmdhint << "zypper install " << highest.asString();
return str::form(
_("There is an update candidate for '%s', but it is from a different"
msg << str::form(_(
"The selected package '%s' from repository '%s' has lower"
" version than the installed one."),
- resolvable_user_string(*_objsel.resolvable()).c_str(),
- _objsel->repoInfo().asUserString().c_str() );
+ _objsel.asString().c_str(),
+ _objsel.repoInfo().asUserString().c_str() );
msg << " ";
msg << str::form(
// translators: %s = "zypper install --oldpackage package-version.arch"
case SET_TO_INSTALL:
return str::form(
_("Selecting '%s' from repository '%s' for installation."),
- resolvable_user_string(*_objsel.resolvable()).c_str(),
- _objsel->repoInfo().asUserString().c_str() );
+ _objsel.asString().c_str(),
+ _objsel.repoInfo().asUserString().c_str() );
case FORCED_INSTALL:
return str::form(
_("Forcing installation of '%s' from repository '%s'."),
- resolvable_user_string(*_objsel.resolvable()).c_str(),
- _objsel->repoInfo().asUserString().c_str() );
+ _objsel.asString().c_str(),
+ _objsel.repoInfo().asUserString().c_str() );
case SET_TO_REMOVE:
return str::form(_("Selecting '%s' for removal."),
- resolvable_user_string(*_objsel.resolvable()).c_str());
+ _objsel.asString().c_str() );
case INSTALLED_LOCKED:
{
_inst_size_change = ByteCount();
// find multi-version packages, which actually have mult. versions installed
- for_( ident, sat::Pool::instance().multiversionBegin(), sat::Pool::instance().multiversionEnd() )
+ for ( ui::Selectable::Ptr s : sat::Pool::instance().multiversion().selectable() )
{
- ui::Selectable::Ptr s = pool.proxy().lookup(*ident);
- bool got_multi = s && (
- s->installedSize() > 1 ||
- (s->installedSize() == 1 && s->toInstall()) );
- if (got_multi)
+ if ( !s )
+ continue;
+ if ( s->installedSize() > 1 || ( s->installedSize() == 1 && s->toInstall() ) )
_multiInstalled.insert( s->name() );
}
// collect resolvables to be installed/removed
{
if (it->status().isToBeInstalled() || it->status().isToBeUninstalled())
{
- if (it->resolvable()->kind() == ResKind::patch)
+ if ( it->isKind( ResKind::patch ) )
{
Patch::constPtr patch = asKind<Patch>(it->resolvable());
if (it->status().isToBeInstalled())
{
DBG << "<install> ";
- to_be_installed[it->resolvable()->kind()].insert(it->resolvable());
+ to_be_installed[it->kind()].insert(it->resolvable());
}
if (it->status().isToBeUninstalled())
{
DBG << "<uninstall> ";
- to_be_removed[it->resolvable()->kind()].insert(it->resolvable());
+ to_be_removed[it->kind()].insert(it->resolvable());
}
DBG << *it << endl;
}
if (!(*it)->hasInstalledObj())
continue;
- ResObject::constPtr candidate =
- (*it)->highestAvailableVersionObj().resolvable();
+ PoolItem candidate = (*it)->highestAvailableVersionObj();
if (!candidate)
continue;
- if (compareByNVRA((*it)->installedObj().resolvable(), candidate) >= 0)
+ if (compareByNVRA((*it)->installedObj(), candidate) >= 0)
continue;
// ignore higher versions with different arch (except noarch) bnc #646410
- if ((*it)->installedObj()->arch() != candidate->arch()
- && (*it)->installedObj()->arch() != Arch_noarch
- && candidate->arch() != Arch_noarch)
+ if ((*it)->installedObj().arch() != candidate.arch()
+ && (*it)->installedObj().arch() != Arch_noarch
+ && candidate.arch() != Arch_noarch)
continue;
// mutliversion packages do not end up in _toupgrade, so we need to remove
// them from candidates if the candidate actually installs (bnc #629197)
- if (_multiInstalled.find(candidate->name()) != _multiInstalled.end()
- && candidate->poolItem().status().isToBeInstalled())
+ if (_multiInstalled.find(candidate.name()) != _multiInstalled.end()
+ && candidate.status().isToBeInstalled())
continue;
- candidates[*kit].insert(ResPair(nullptr, candidate));
+ candidates[*kit].insert(ResPair(nullptr, candidate.resolvable()));
}
MIL << *kit << " update candidates: " << candidates[*kit].size() << endl;
MIL << "to be actually updated: " << _toupgrade[*kit].size() << endl;
} // namespace
///////////////////////////////////////////////////////////////////
-void printNVA(const ResObject::constPtr & res)
+void printNVA( const PoolItem & pi_r )
{
- cout << _("Name: ") << res->name() << endl;
- cout << _("Version: ") << res->edition().asString() << endl;
- cout << _("Arch: ") << res->arch().asString() << endl;
- cout << _("Vendor: ") << res->vendor() << endl;
+ cout << _("Name: ") << pi_r.name() << endl;
+ cout << _("Version: ") << pi_r.edition().asString() << endl;
+ cout << _("Arch: ") << pi_r.arch().asString() << endl;
+ cout << _("Vendor: ") << pi_r.vendor() << endl;
}
-void printSummaryDesc(const ResObject::constPtr & res)
+void printSummaryDesc( const PoolItem & pi_r )
{
- cout << _("Summary: ") << res->summary() << endl;
+ cout << _("Summary: ") << pi_r.summary() << endl;
cout << _("Description: ") << endl;
- Zypper::instance()->out().printRichText( res->description(), 2/*indented*/ );
+ Zypper::instance()->out().printRichText( pi_r.description(), 2/*indented*/ );
}
///////////////////////////////////////////////////////////////////
theone = installed;
}
- cout << _("Repository: ")
- << theone.resolvable()->repository().asUserString() << endl;
+ cout << _("Repository: ") << theone.repository().asUserString() << endl;
- printNVA(theone.resolvable());
+ printNVA( theone );
// if running on SUSE Linux Enterprise, report unsupported packages
if ( runningOnEnterprise() )
{
if ( updateCand )
{
- cout << str::form(_("out-of-date (version %s installed)"),
- installed.resolvable()->edition().asString().c_str())
- << endl;
+ cout << str::form(_("out-of-date (version %s installed)"), installed.edition().c_str()) << endl;
}
else
{
else
cout << _("not installed") << endl;
- cout << _("Installed Size: ") << theone.resolvable()->installSize() << endl;
+ cout << _("Installed Size: ") << theone.installSize() << endl;
- printSummaryDesc(theone.resolvable());
+ printSummaryDesc( theone );
// Print dependency lists if CLI requests it
for ( auto && dep : cliSupportedDepTypes() )
void printPatchInfo(Zypper & zypper, const ui::Selectable & s )
{
const PoolItem & pool_item = s.theObj();
- printNVA(pool_item.resolvable());
+ printNVA( pool_item );
cout << _("Status: ") << string_patch_status(pool_item) << endl;
cout << _("Interactive: ") << (patch->interactiveWhenIgnoring(ignoreFlags) ? _("Yes") : _("No")) << endl;
- printSummaryDesc(pool_item.resolvable());
+ printSummaryDesc( pool_item );
// Print dependency lists if CLI requests it
for ( auto && dep : cliSupportedDepTypes() )
void printPatternInfo(Zypper & zypper, const ui::Selectable & s)
{
const PoolItem & pool_item = s.theObj();
+ Pattern::constPtr pattern = asKind<Pattern>(pool_item.resolvable());
- if ( !pool_item.resolvable()->isKind<Pattern>() )
+ if ( !pattern )
return;
- cout << _("Repository: ")
- << pool_item.resolvable()->repository().asUserString() << endl;
+ cout << _("Repository: ") << pool_item.repository().asUserString() << endl;
- printNVA(pool_item.resolvable());
+ printNVA( pool_item );
cout << _("Installed: ") << (s.hasInstalledObj() ? _("Yes") : _("No")) << endl;
- cout << _("Visible to User: ") << (pool_item.resolvable()->asKind<Pattern>()->userVisible() ? _("Yes") : _("No")) << endl;
+ cout << _("Visible to User: ") << (pattern->userVisible() ? _("Yes") : _("No")) << endl;
- printSummaryDesc(pool_item.resolvable());
+ printSummaryDesc( pool_item );
if (zypper.globalOpts().is_rug_compatible)
return;
th << _("S") << _("Name") << _("Type") << _("Dependency");
t << th;
- //God->resolver()->solve();
-
- Pattern::constPtr pattern = asKind<Pattern>(pool_item.resolvable());
Pattern::Contents contents = pattern->contentsNoSuggests(); // (bnc#857671) don't include suggests as we can not deal with them .
for_(sit, contents.selectableBegin(), contents.selectableEnd())
{
}
else
{
- cout << _("Repository: ")
- << pool_item.resolvable()->repository().asUserString() << endl;
+ cout << _("Repository: ") << pool_item.repository().asUserString() << endl;
- printNVA(pool_item.resolvable());
+ printNVA( pool_item );
PoolItem installed;
if (!s.installedEmpty())
cout << ": " << _("undefined") << endl;
}
- printSummaryDesc(pool_item.resolvable());
+ printSummaryDesc( pool_item );
// Print dependency lists if CLI requests it
for ( auto && dep : cliSupportedDepTypes() )
}
// ----------------------------------------------------------------------------
-
-static string get_display_name(const ResObject::constPtr & obj)
-{
- // in most cases we want to display full product name (bnc #589333)
- if (obj->kind() == ResKind::product)
- return obj->summary();
- return obj->name();
-}
+namespace {
+ inline std::string get_display_name( const PoolItem & obj )
+ {
+ // in most cases we want to display full product name (bnc #589333)
+ if ( obj.isKind<Product>() )
+ return obj.summary();
+ return obj.name();
+ }
+} // namespace
/* debugging
static
zypper.cOpts().count("auto-agree-with-licenses")
|| zypper.cOpts().count("agree-to-third-party-licenses");
- for (ResPool::const_iterator it = God->pool().begin(); it != God->pool().end(); ++it)
+ for ( const PoolItem & pi : God->pool() )
{
bool to_accept = true;
- if (it->status().isToBeInstalled() &&
- !it->resolvable()->licenseToConfirm().empty())
+ if (pi.status().isToBeInstalled() &&
+ !pi.licenseToConfirm().empty())
{
ui::Selectable::Ptr selectable =
- God->pool().proxy().lookup(it->resolvable()->kind(), it->resolvable()->name());
+ God->pool().proxy().lookup(pi.kind(), pi.name());
// this is an upgrade, check whether the license changed
// for now we only do dumb string comparison (bnc #394396)
{
bool differ = false;
for_(inst, selectable->installedBegin(), selectable->installedEnd())
- if (inst->resolvable()->licenseToConfirm() != it->resolvable()->licenseToConfirm())
+ if (inst->resolvable()->licenseToConfirm() != pi.licenseToConfirm())
{ differ = true; break; }
if (!differ)
{
DBG << "old and new license does not differ for "
- << it->resolvable()->name() << endl;
+ << pi.name() << endl;
continue;
}
- DBG << "new license for " << it->resolvable()->name()
+ DBG << "new license for " << pi.name()
<< " is different, needs confirmation " << endl;
}
// translators: the first %s is name of the resolvable,
// the second is its kind (e.g. 'zypper package')
format(_("Automatically agreeing with %s %s license."))
- % get_display_name(it->resolvable())
- % kind_to_string_localized(it->resolvable()->kind(),1)));
+ % get_display_name( pi )
+ % kind_to_string_localized(pi.kind(),1)));
MIL << format("Automatically agreeing with %s %s license.")
- % it->resolvable()->name() % it->resolvable()->kind().asString()
+ % pi.name() % pi.kind().asString()
<< endl;
continue;
ostringstream s;
string kindstr =
- it->resolvable()->kind() != ResKind::package ?
- " (" + kind_to_string_localized(it->resolvable()->kind(), 1) + ")" :
+ pi.kind() != ResKind::package ?
+ " (" + kind_to_string_localized(pi.kind(), 1) + ")" :
string();
- if ( !it->resolvable()->needToAcceptLicense() )
+ if ( !pi.needToAcceptLicense() )
to_accept = false;
if (to_accept)
// is " (package-type)" if other than "package" (patch/product/pattern)
_("In order to install '%s'%s, you must agree"
" to terms of the following license agreement:"),
- get_display_name(it->resolvable()).c_str(), kindstr.c_str());
+ get_display_name( pi ).c_str(), kindstr.c_str());
s << endl << endl;
}
// license text
- printRichText( s, it->resolvable()->licenseToConfirm() );
+ printRichText( s, pi.licenseToConfirm() );
// show in pager unless we are read by a machine or the pager fails
if (zypper.globalOpts().machine_readable || !show_text_in_pager(s.str()))
// translators: e.g. "... with flash package license."
//! \todo fix this to allow proper translation
_("Aborting installation due to user disagreement with %s %s license."))
- % get_display_name(it->resolvable())
- % kind_to_string_localized(it->resolvable()->kind(), 1)),
+ % get_display_name( pi )
+ % kind_to_string_localized(pi.kind(), 1)),
Out::QUIET);
MIL << "License(s) NOT confirmed (interactive)" << endl;
}
{
PoolQuery q;
- ui::Selectable::constPtr s;
- PoolItem inst;
PoolItem inst_with_repo;
unsigned count_installed = 0, count_installed_repo = 0, count_installed_eula = 0;
set<string> unique_licenses;
- for_(pit, q.selectableBegin(), q.selectableEnd())
+ for ( ui::Selectable::constPtr s : q.selectable() )
{
- s = *pit;
- if (!s) // FIXME this must not be necessary!
+ if ( !s ) // FIXME this must not be necessary!
continue;
- for_(iit, s->installedBegin(), s->installedEnd())
+ for ( const PoolItem & inst : s->installed() )
{
- inst = *iit;
++count_installed;
cout
- << s->name() << "-" << inst.resolvable()->edition()
+ << s->name() << "-" << inst.edition()
<< " (" << kind_to_string_localized(s->kind(), 1) << ")"
<< endl;
- if (s->kind() == ResKind::package)
+ if ( s->kind() == ResKind::package )
{
cout
<< _("License") << ": "
- << asKind<Package>(inst.resolvable())->license()
+ << asKind<Package>(inst)->license()
<< endl;
- unique_licenses.insert(asKind<Package>(inst.resolvable())->license());
+ unique_licenses.insert(asKind<Package>(inst)->license());
}
- for_(it, s->availableBegin(), s->availableEnd())
+ for ( const PoolItem & api : s->available() )
{
- if (identical(*it, inst))
+ if ( identical(api, inst) )
{
- inst_with_repo = *it;
+ inst_with_repo = api;
++count_installed_repo;
break;
}
}
- if (inst_with_repo && !inst_with_repo.resolvable()->licenseToConfirm().empty())
+ if ( inst_with_repo && !inst_with_repo.licenseToConfirm().empty() )
{
cout << _("EULA") << ":" << endl;
- printRichText( cout, inst_with_repo.resolvable()->licenseToConfirm() );
+ printRichText( cout, inst_with_repo.licenseToConfirm() );
cout << endl;
++count_installed_eula;
}
- else if (!inst.resolvable()->licenseToConfirm().empty())
+ else if ( !inst.licenseToConfirm().empty() )
cout << "look! got an installed-only item and it has EULA! he?" << inst << endl;
cout << "-" << endl;
}
return providers;
}
-string poolitem_user_string(const PoolItem & pi)
-{
- return resolvable_user_string(*pi.resolvable());
-}
-
-string resolvable_user_string(const Resolvable & res)
-{
- ostringstream str;
- str << res.name() << "-" << res.edition() << "." << res.arch();
- return str.str();
-}
-
zypp::PoolItem get_installed_obj(zypp::ui::Selectable::Ptr & s)
{
PoolItem installed;
std::set<zypp::PoolItem>
get_installed_providers(const zypp::Capability & cap);
-
-std::string poolitem_user_string(const zypp::PoolItem & pi);
-
-/** Returns string("name-edition.arch"). */
-std::string resolvable_user_string(const zypp::Resolvable & res);
-
/**
* Get the highest-version installed pacakge/product or satisfied patch/pattern
* from the selectable.
bool error = true;
try
{
- zypper.out().info(
- str::form(_("Refreshing service '%s'."), service.asUserString().c_str()));
+ zypper.out().info( str::form(_("Refreshing service '%s'."), service.asUserString().c_str() ) );
RepoManager::RefreshServiceOptions opts;
if ( zypper.cOpts().count("restore-status") )
opts |= RepoManager::RefreshService_restoreStatus;
+ if ( zypper.cOpts().count("force")
+ && ( zypper.command() == ZypperCommand::REFRESH || zypper.command() == ZypperCommand::REFRESH_SERVICES ) )
+ opts |= RepoManager::RefreshService_forceRefresh;
manager.refreshService( service, opts );
error = false;
for_(ait, s->availableBegin(), s->availableEnd())
for_(iit, s->installedBegin(), s->installedEnd())
if (identical(*ait, *iit) &&
- _repos.find(ait->resolvable()->repoInfo().alias()) != _repos.end())
+ _repos.find(ait->repoInfo().alias()) != _repos.end())
{
installed = true;
break;
zypp::Patch::constPtr patch = zypp::asKind<zypp::Patch>(pi.resolvable());
row
- << pi->repository().asUserString()
- << pi->name()
+ << pi.repository().asUserString()
+ << pi.name()
<< patch->category()
<< patch->severity()
<< string_patch_status(pi);
bool installed_only = zypper.cOpts().count("installed-only");
bool notinst_only = zypper.cOpts().count("uninstalled-only");
- for_( it, God->pool().byKindBegin<Pattern>(), God->pool().byKindEnd<Pattern>() )
+ for( const PoolItem & pi : God->pool().byKind<Pattern>() )
{
- bool isInstalled = it->status().isInstalled();
+ bool isInstalled = pi.status().isInstalled();
if ( isInstalled && notinst_only && !installed_only )
continue;
else if ( !isInstalled && installed_only && !notinst_only )
continue;
- Pattern::constPtr pattern = asKind<Pattern>(it->resolvable());
+ Pattern::constPtr pattern = asKind<Pattern>(pi.resolvable());
// hide patterns with user visible flag not set (bnc #538152)
if (!pattern->userVisible())
continue;
TableRow tr;
tr << (isInstalled ? "i" : "");
- tr << pattern->name () << pattern->edition().asString();
+ tr << pi.name() << pi.edition();
if (!zypper.globalOpts().is_rug_compatible)
{
- tr << pattern->repoInfo().name();
- tr << string_weak_status(it->status ());
+ tr << pi.repoInfo().name();
+ tr << string_weak_status(pi.status());
}
tbl << tr;
}
DBG << "patch check" << endl;
gData.patches_count = gData.security_patches_count = 0;
- ResPool::byKind_iterator
- it = God->pool().byKindBegin(ResKind::patch),
- e = God->pool().byKindEnd(ResKind::patch);
- for (; it != e; ++it )
+ for_( it, God->pool().byKindBegin(ResKind::patch), God->pool().byKindEnd(ResKind::patch) )
{
- ResObject::constPtr res = it->resolvable();
- Patch::constPtr patch = asKind<Patch>(res);
-
- if (it->isRelevant() && !it->isSatisfied())
+ const PoolItem & pi( *it );
+ if ( pi.isRelevant() && !pi.isSatisfied())
{
gData.patches_count++;
- if (patch->categoryEnum() == Patch::CAT_SECURITY)
+ if (pi->asKind<Patch>()->categoryEnum() == Patch::CAT_SECURITY)
gData.security_patches_count++;
}
}
{
const zypp::ResPool& pool = God->pool();
- unsigned int patchcount=0;
- bool pkg_mgr_available = false;
- Patch::constPtr patch;
-
- ResPool::byKind_iterator
- it = pool.byKindBegin(ResKind::patch),
- e = pool.byKindEnd(ResKind::patch);
-
// check whether there are packages affecting the update stack
- for (; it != e; ++it)
+ bool pkg_mgr_available = false;
+ for_( it, pool.byKindBegin(ResKind::patch), pool.byKindEnd(ResKind::patch) )
{
- patch = asKind<Patch>(it->resolvable());
- if (it->isRelevant() && !it->isSatisfied() && patch->restartSuggested())
+ const PoolItem & pi( *it );
+
+ if ( pi.isRelevant() && !pi.isSatisfied() && pi->asKind<Patch>()->restartSuggested() )
{
pkg_mgr_available = true;
break;
}
}
- it = pool.byKindBegin(ResKind::patch);
- for (; it != e; ++it, ++patchcount)
+ unsigned patchcount = 0;
+ for_( it, pool.byKindBegin(ResKind::patch), pool.byKindEnd(ResKind::patch) )
{
if (zypper.cOpts().count("all") || it->isBroken())
{
- ResObject::constPtr res = it->resolvable();
- Patch::constPtr patch = asKind<Patch>(res);
+ const PoolItem & pi( *it );
+ Patch::constPtr patch = pi->asKind<Patch>();
// if updates stack patches are available, show only those
if ((pkg_mgr_available && patch->restartSuggested()) || !pkg_mgr_available)
{
cout << " <update ";
- cout << "name=\"" << res->name () << "\" ";
- cout << "edition=\"" << res->edition ().asString() << "\" ";
- cout << "arch=\"" << res->arch().asString() << "\" ";
+ cout << "name=\"" << pi.name () << "\" ";
+ cout << "edition=\"" << pi.edition() << "\" ";
+ cout << "arch=\"" << pi.arch() << "\" ";
cout << "status=\"" << patchStatusAsString( *it ) << "\" ";
cout << "category=\"" << patch->category() << "\" ";
cout << "severity=\"" << patch->severity() << "\" ";
cout << "interactive=\"" << (patch->interactiveWhenIgnoring(ignoreFlags) ? "true" : "false") << "\" ";
cout << "kind=\"patch\"";
cout << ">" << endl;
- cout << " <summary>" << xml::escape(patch->summary()) << " </summary>" << endl;
- cout << " <description>" << xml::escape(patch->description()) << "</description>" << endl;
- cout << " <license>" << xml::escape(patch->licenseToConfirm()) << "</license>" << endl;
+ cout << " <summary>" << xml::escape(pi.summary()) << " </summary>" << endl;
+ cout << " <description>" << xml::escape(pi.description()) << "</description>" << endl;
+ cout << " <license>" << xml::escape(pi.licenseToConfirm()) << "</license>" << endl;
- if ( !patch->repoInfo().alias().empty() )
+ if ( !pi.repoInfo().alias().empty() )
{
- cout << " <source url=\"" << xml::escape(patch->repoInfo().url().asString());
- cout << "\" alias=\"" << xml::escape(patch->repoInfo().alias()) << "\"/>" << endl;
+ cout << " <source url=\"" << xml::escape(pi.repoInfo().url().asString());
+ cout << "\" alias=\"" << xml::escape(pi.repoInfo().alias()) << "\"/>" << endl;
}
cout << " </update>" << endl;
}
+ ++patchcount;
}
}
static void xml_list_updates(const ResKindSet & kinds)
{
Candidates candidates;
- find_updates (kinds, candidates);
-
- Candidates::iterator cb = candidates.begin (), ce = candidates.end (), ci;
- for (ci = cb; ci != ce; ++ci) {
- ResObject::constPtr res = ci->resolvable();
+ find_updates( kinds, candidates );
+ for( const PoolItem & pi : candidates )
+ {
cout << " <update ";
- cout << "name=\"" << res->name () << "\" " ;
- cout << "edition=\"" << res->edition ().asString() << "\" ";
- cout << "arch=\"" << res->arch().asString() << "\" ";
- cout << "kind=\"" << res->kind() << "\" ";
+ cout << "name=\"" << pi.name () << "\" " ;
+ cout << "edition=\"" << pi.edition() << "\" ";
+ cout << "arch=\"" << pi.arch() << "\" ";
+ cout << "kind=\"" << pi.kind() << "\" ";
cout << ">" << endl;
- cout << " <summary>" << xml::escape(res->summary()) << " </summary>" << endl;
- cout << " <description>" << xml::escape(res->description()) << "</description>" << endl;
- cout << " <license>" << xml::escape(res->licenseToConfirm()) << "</license>" << endl;
+ cout << " <summary>" << xml::escape(pi.summary()) << " </summary>" << endl;
+ cout << " <description>" << xml::escape(pi.description()) << "</description>" << endl;
+ cout << " <license>" << xml::escape(pi.licenseToConfirm()) << "</license>" << endl;
- if ( !res->repoInfo().alias().empty() )
+ if ( !pi.repoInfo().alias().empty() )
{
- cout << " <source url=\"" << xml::escape(res->repoInfo().url().asString());
- cout << "\" alias=\"" << xml::escape(res->repoInfo().alias()) << "\"/>" << endl;
+ cout << " <source url=\"" << xml::escape(pi.repoInfo().url().asString());
+ cout << "\" alias=\"" << xml::escape(pi.repoInfo().alias()) << "\"/>" << endl;
}
cout << " </update>" << endl;
PoolItem candidate = (*it)->highestAvailableVersionObj(); // bnc #557557
if (!candidate)
continue;
- if (compareByNVRA((*it)->installedObj().resolvable(), candidate.resolvable()) >= 0)
+ if (compareByNVRA((*it)->installedObj(), candidate) >= 0)
continue;
DBG << "selectable: " << **it << endl;
Candidates candidates;
find_updates( *it, candidates );
- Candidates::iterator cb = candidates.begin (), ce = candidates.end (), ci;
- for (ci = cb; ci != ce; ++ci) {
- ResObject::constPtr res = ci->resolvable();
+ for ( const PoolItem & pi : candidates )
+ {
TableRow tr (cols);
tr << "v";
if (!hide_repo) {
- tr << res->repoInfo().asUserString();
+ tr << pi.repoInfo().asUserString();
}
if (zypper.globalOpts().is_rug_compatible)
tr << ""; // Bundle
- tr << res->name ();
+ tr << pi.name ();
// strictly speaking, we could show version and arch even in best_effort
// iff there is only one candidate. But we don't know the number of candidates here.
// for packages show also the current installed version (bnc #466599)
if (*it == ResKind::package)
{
- ui::Selectable::Ptr sel( uipool.lookup( *ci ) );
+ ui::Selectable::Ptr sel( uipool.lookup( pi ) );
if ( sel->hasInstalledObj() )
- tr << sel->installedObj()->edition().asString();
+ tr << sel->installedObj()->edition();
}
- tr << res->edition ().asString ()
- << res->arch ().asString ();
+ tr << pi.edition()
+ << pi.arch();
}
tbl << tr;
}
BuildRequires: cmake >= 2.4.6
BuildRequires: gcc-c++ >= 4.7
BuildRequires: gettext-devel >= 0.15
-BuildRequires: libzypp-devel >= 15.9.0
+BuildRequires: libzypp-devel >= 15.13.0
BuildRequires: readline-devel >= 5.1
Requires: procps
%if 0%{?suse_version}