Manage access to librpm database.
More...
#include <zypp/target/rpm/librpmDb.h>
|
| librpmDb (const Pathname &root_r, const Pathname &dbPath_r, bool readonly_r=true) |
| Private constructor!
|
void | unref_to (unsigned refCount_r) const override |
| Trigger from Rep, after refCount was decreased.
|
|
virtual void | ref_to (unsigned) const |
| Trigger derived classes after refCount was increased.
|
Manage access to librpm database.
Definition at line 51 of file librpmDb.h.
◆ Ptr
◆ constPtr
◆ librpmDb()
zypp::target::rpm::librpmDb::librpmDb |
( |
const Pathname & | root_r, |
|
|
const Pathname & | dbPath_r, |
|
|
bool | readonly_r = true ) |
|
private |
Private constructor!
librpmDb objects are to be created via static interface only.
Definition at line 227 of file librpmDb.cc.
◆ ~librpmDb()
zypp::target::rpm::librpmDb::~librpmDb |
( |
| ) |
|
|
override |
◆ dbAccess() [1/2]
void zypp::target::rpm::librpmDb::dbAccess |
( |
librpmDb::Ptr & | ptr_r | ) |
|
|
staticprivate |
INTENTIONALLY UNDEFINED<\B> because of bug in Ptr classes which allows implicit conversion from librpmDb::Ptr to librpmDb::constPtr.
Currently we don't want to provide non const handles, as the database is opened READONLY.
- Exceptions
-
◆ globalInit()
bool zypp::target::rpm::librpmDb::globalInit |
( |
| ) |
|
|
static |
Initialize lib librpm (read configfiles etc.).
It's called on demand but you may call it anytime.
- Returns
- Whether librpm is initialized.
Definition at line 139 of file librpmDb.cc.
◆ expand()
std::string zypp::target::rpm::librpmDb::expand |
( |
const std::string & | macro_r | ) |
|
|
static |
- Returns
- librpm macro expansion.
Definition at line 159 of file librpmDb.cc.
◆ suggestedDbPath()
Pathname zypp::target::rpm::librpmDb::suggestedDbPath |
( |
const Pathname & | root_r | ) |
|
|
static |
- Returns
- The preferred location of the rpmdb below root_r. It's the location of an already existing db, otherwise the default location suggested by rpm's config.
- Exceptions
-
RpmException | if root is not an absolute path or no directory for the rpmdb can determined. |
Definition at line 171 of file librpmDb.cc.
◆ dbExists()
- Returns
- whether the rpmdb below the system at root_r exists. Unless a dbPath_r is explicitly specified, the systems default rpmdb is used (
- See also
- suggestedDbPath).
- Exceptions
-
RpmException | if no directory for the rpmdb can be determined. |
Definition at line 183 of file librpmDb.cc.
◆ dbOpenIf()
Open the rpmdb below the system at root_r (if it exists).
If the database does not exist a nullptr
is returned. Unless a dbPath_r is explicitly specified, the systems default rpmdb is used (
- See also
- suggestedDbPath).
- Exceptions
-
Definition at line 195 of file librpmDb.cc.
◆ dbOpenCreate()
Assert the rpmdb below the system at root_r exists.
If the database does not exist an empty one is created. Unless a dbPath_r is explicitly specified, the systems default rpmdb is used (
- See also
- suggestedDbPath).
- Exceptions
-
Definition at line 198 of file librpmDb.cc.
◆ dbAccess() [2/2]
Internal workhorse managing database creation and access.
- Exceptions
-
Definition at line 201 of file librpmDb.cc.
◆ unref_to()
void zypp::target::rpm::librpmDb::unref_to |
( |
unsigned | refCount_r | ) |
const |
|
overrideprivatevirtual |
◆ root()
const Pathname & zypp::target::rpm::librpmDb::root |
( |
| ) |
const |
- Returns
- This handles root directory for all operations.
Definition at line 240 of file librpmDb.cc.
◆ dbPath()
const Pathname & zypp::target::rpm::librpmDb::dbPath |
( |
| ) |
const |
- Returns
- This handles directory that contains the rpmdb.
Definition at line 243 of file librpmDb.cc.
◆ dumpOn()
std::ostream & zypp::target::rpm::librpmDb::dumpOn |
( |
std::ostream & | str | ) |
const |
|
overridevirtual |
◆ _d
D& zypp::target::rpm::librpmDb::_d |
|
private |
The documentation for this class was generated from the following files: