Public Member Functions | |
| Packages () | |
| void | clear () |
| Package::Ptr | lookup (const string &name_r) const |
| void | buildIndex () |
Public Attributes | |
| list< Package::Ptr > | _list |
| map< string, Package::Ptr > | _index |
| bool | _valid |
We have to assert, that there is a unique entry for every string.
In the first step we build the _list list which contains all packages (even those which are contained in multiple versions).
At the end buildIndex() is called to build the _index is created and points to the last installed versions of all packages. Operations changing the rpmdb content (install/remove package) should set _valid to false. The next call to RpmDb::getPackages() will then reread the the rpmdb.
Note that outside RpmDb::getPackages() _list and _index are always in sync. So you may use lookup(PkgName) to retrieve a specific Package::Ptr.
Definition at line 212 of file RpmDb.cc.
| void zypp::target::rpm::RpmDb::Packages::clear | ( | ) | [inline] |
Definition at line 220 of file RpmDb.cc.
References _index, _list, and _valid.
Referenced by zypp::target::rpm::RpmDb::closeDatabase(), and zypp::target::rpm::RpmDb::doGetPackages().
| Package::Ptr zypp::target::rpm::RpmDb::Packages::lookup | ( | const string & | name_r | ) | const [inline] |
Definition at line 226 of file RpmDb.cc.
References _index.
Referenced by zypp::target::rpm::RpmDb::doGetPackages().
| void zypp::target::rpm::RpmDb::Packages::buildIndex | ( | ) | [inline] |
Definition at line 215 of file RpmDb.cc.
Referenced by buildIndex(), clear(), and zypp::target::rpm::RpmDb::doGetPackages().
Definition at line 217 of file RpmDb.cc.
Referenced by buildIndex(), clear(), zypp::target::rpm::RpmDb::doRebuildDatabase(), zypp::target::rpm::RpmDb::importPubkey(), zypp::target::rpm::RpmDb::modifyDatabase(), and zypp::target::rpm::RpmDb::packagesValid().
1.5.3