libzypp  17.38.7
zyppng::sat::Repository::EraseFromPool Struct Reference

Query class for Repository related products. More...

#include <zypp/ng/sat/repository.h>

Public Member Functions

void operator() (Repository repository_r) const
 

Detailed Description

Query class for Repository related products.

Products are identified by CpeIds within the repositories metadata.

See also
http://en.opensuse.org/Standards/Rpm_Metadata#SUSE_repository_info_.28suseinfo.xml.29.2C_extensions_to_repomd.xml

The iterator does not provide a dereference operator so you can do * on it, but you can access the attributes of each related product directly from the iterator.

for_( it, repo.compatibleWithProductBegin(), repo.compatibleWithProductEnd() )
{
cout << it.label() << ": " << it.cpeid() << endl;
}

Iterate the repository compatible distros. Iterate distos the repository provides upadates for. Functor removing Repository from its Pool.

E.g. used as dispose function in. AutoDispose to provide a convenient and exception safe temporary Repository.

sat::Pool satpool;
MIL << "1 " << satpool << endl;
{
AutoDispose<Repository> tmprepo( (Repository::EraseFromPool()) );
*tmprepo = satpool.reposInsert( "A" );
tmprepo->addSolv( "sl10.1-beta7-packages.solv" );
DBG << "2 " << satpool << endl;
// Calling 'tmprepo.resetDispose();' here
// would keep the Repo.
}
MIL << "3 " << satpool << endl;
1 sat::pool(){0repos|2solv}
2 sat::pool(){1repos|2612solv}
3 sat::pool(){0repos|2solv}

Leaving the block without calling tmprepo.resetDispose(); before, will automatically remove the Repo from its Pool.

Definition at line 461 of file repository.h.

Member Function Documentation

◆ operator()()

void zyppng::sat::Repository::EraseFromPool::operator() ( Repository  repository_r) const
inline

Definition at line 463 of file repository.h.


The documentation for this struct was generated from the following file: