Author: jkupec
Date: Thu Feb 14 14:27:06 2008
New Revision: 8681
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8681&view=rev
Log:
- byName -> byIdent
Modified:
branches/tmp/ma/jump_sat/zypper/src/zypper-misc.cc
Modified: branches/tmp/ma/jump_sat/zypper/src/zypper-misc.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/zypper/src/zypper-misc.cc?rev=8681&r1=8680&r2=8681&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/zypper/src/zypper-misc.cc (original)
+++ branches/tmp/ma/jump_sat/zypper/src/zypper-misc.cc Thu Feb 14 14:27:06 2008
@@ -231,9 +231,9 @@
// get the installed version
VersionGetter vg;
invokeOnEach(
- God->pool().byNameBegin(capstr),
- God->pool().byNameEnd(capstr),
- chain(ByKind(kind),ByInstalled()),
+ God->pool().byIdentBegin(kind, capstr),
+ God->pool().byIdentEnd(kind,capstr),
+ ByInstalled(),
functorRef (vg));
// installed found
if (vg.found)
@@ -241,9 +241,9 @@
// check for newer version of that resolvable
NewerVersionGetter nvg(vg.edition);
invokeOnEach(
- God->pool().byNameBegin(capstr),
- God->pool().byNameEnd(capstr),
- chain(resfilter::ByKind(kind),not_c(ByInstalled())),
+ God->pool().byIdentBegin(kind, capstr),
+ God->pool().byIdentEnd(kind,capstr),
+ not_c(ByInstalled()),
functorRef (nvg));
// newer version found
if (nvg.found)
@@ -271,16 +271,14 @@
const ResObject::Kind &kind,
const std::string &name)
{
- const ResPool &pool = God->pool();
// name and kind match:
-
- ProvideProcess installer (God->architecture(), "" /*version*/);
+ ProvideProcess installer (ZConfig::instance().systemArchitecture(), "" /*version*/);
cout_vv << "Iterating over [" << kind << "]" << name << endl;
- invokeOnEach( pool.byNameBegin( name ),
- pool.byNameEnd( name ),
- resfilter::ByKind( kind ),
- zypp::functor::functorRef (installer)
- );
+ invokeOnEach(
+ God->pool().byIdentBegin(kind, name),
+ God->pool().byIdentEnd(kind, name),
+ zypp::functor::functorRef (installer));
+
cout_vv << "... done" << endl;
if (!installer.item) {
// TranslatorExplanation e.g. "package 'pornview' not found"
@@ -350,10 +348,9 @@
DeleteProcess deleter;
cerr_vv << "Iterating over " << name << endl;
- invokeOnEach( pool.byNameBegin( name ),
- pool.byNameEnd( name ),
- functor::chain (resfilter::ByInstalled(),
- resfilter::ByKind( kind )),
+ invokeOnEach( pool.byIdentBegin( kind, name ),
+ pool.byIdentEnd( kind, name ),
+ resfilter::ByInstalled(),
zypp::functor::functorRef (deleter)
);
cerr_vv << "... done" << endl;
@@ -1212,17 +1209,15 @@
{
LookForArchUpdate info;
- invokeOnEach( pool.byNameBegin( item->name() ),
- pool.byNameEnd( item->name() ),
- // get uninstalled, equal kind and arch, better edition
- functor::chain (
- functor::chain (
- functor::chain (
- resfilter::ByUninstalled (),
- resfilter::ByKind( item->kind() ) ),
- resfilter::byArch( item->arch() ) ),
- resfilter::byEdition( item->edition() )),
- functor::functorRef (info) );
+ invokeOnEach( pool.byIdentBegin( item->kind(), item->name() ),
+ pool.byIdentEnd( item->kind(), item->name() ),
+ // get uninstalled, equal kind and arch, better edition
+ functor::chain (
+ functor::chain (
+ resfilter::ByUninstalled (),
+ resfilter::byArch( item->arch() ) ),
+ resfilter::byEdition( item->edition() )),
+ functor::functorRef (info) );
_XDEBUG("findArchUpdateItem(" << item << ") => " << info.best);
return info.best;
@@ -1348,13 +1343,10 @@
const zypp::ResPool& pool = God->pool();
LookForArchUpdate info;
- invokeOnEach( pool.byNameBegin( item->name() ),
- pool.byNameEnd( item->name() ),
- // get installed, equal kind
- functor::chain (
- resfilter::ByInstalled (),
- resfilter::ByKind( item->kind() ) ),
- functor::functorRef (info) );
+ invokeOnEach( pool.byIdentBegin( item->kind(), item->name() ),
+ pool.byIdentEnd( item->kind(), item->name() ),
+ resfilter::ByInstalled (),
+ functor::functorRef (info) );
_XDEBUG("findInstalledItem(" << item << ") => " << info.best);
return info.best;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org