libzypp 17.38.6
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;
}
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
Definition Easy.h:27

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;
{
*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;
#define DBG
Definition Logger.h:102
#define MIL
Definition Logger.h:103
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Definition AutoDispose.h:95
Orchestrator for a libsolv pool instance.
Definition pool.h:37
Repository reposInsert(const std::string &alias_r)
Return a Repository named alias_r.
Definition pool.cc:194
void addSolv(const zypp::Pathname &file_r)
Load Solvables from a solv-file.
Query class for Repository related products.
Definition repository.h:461
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 460 of file repository.h.

Member Function Documentation

◆ operator()()

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

Definition at line 462 of file repository.h.


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