17#include <zypp/base/ReferenceCounted.h>
18#include <zypp/base/NonCopyable.h>
19#include <zypp/base/PtrTypes.h>
20#include <zypp/PathInfo.h>
132 return std::string(
"'(" ) +
root_r.asString() +
")" +
sub_r.asString() +
"'";
251 class db_const_iterator;
318 unsigned size()
const;
330 std::ostream &
dumpOn( std::ostream &
str )
const override;
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Edition represents [epoch:]version[-release]
TraitsType::constPtrType constPtr
Base class for reference counted objects.
librpmDb internal database handle
Subclass to retrieve database content.
unsigned dbHdrNum() const
Returns the current headers index in database, 0 if no header.
bool findByProvides(const std::string &tag_r)
Reset to iterate all packages that provide a certain tag.
bool findByName(const std::string &name_r)
Reset to iterate all packages with a certain name.
db_const_iterator & operator=(const db_const_iterator &)
~db_const_iterator()
Destructor.
const RpmHeader::constPtr & operator->() const
Forwards to the current RpmHeader::constPtr.
bool findByFile(const std::string &file_r)
Reset to iterate all packages that own a certain file.
bool findAll()
Reset to iterate all packages.
const RpmHeader::constPtr & operator*() const
Returns the current RpmHeader::constPtr or NULL, if no more entries available.
friend std::ostream & operator<<(std::ostream &str, const db_const_iterator &obj)
bool findByRequiredBy(const std::string &tag_r)
Reset to iterate all packages that require a certain tag.
bool findPackage(const std::string &name_r)
Find package by name.
shared_ptr< RpmException > dbError() const
Return any database error.
void operator++()
Advance to next RpmHeader::constPtr.
bool findByConflicts(const std::string &tag_r)
Reset to iterate all packages that conflict with a certain tag.
db_const_iterator(const db_const_iterator &)
Manage access to librpm database.
static bool _dbBlocked
Whether access is blocked (no _defaultDb will be available).
intrusive_ptr< const librpmDb > constPtr
static const Pathname & defaultDbPath()
static unsigned blockAccess(const Pathname &root_r, const Pathname &dbPath_r)
const Pathname & dbPath() const
const Pathname & root() const
static bool globalInit()
Initialize lib librpm (read configfiles etc.).
static const Pathname & defaultRoot()
static std::string stringPath(const Pathname &root_r, const Pathname &sub_r)
static unsigned dbRelease(bool force_r=false)
If there are no outstanding references to the database (e.g.
static std::ostream & dumpState(std::ostream &str)
Dump debug info.
static librpmDb::constPtr _defaultDb
Current rpmdb handle.
shared_ptr< RpmException > error() const
Return any database error.
static Pathname _rpmDefaultDbPath
_dbpath configured in rpm config.
static Pathname _defaultDbPath
Current directory (below root) that contains the rpmdb.
static librpmDb * newLibrpmDb()
For internal use.
std::ostream & dumpOn(std::ostream &str) const override
Dump debug info.
void * dont_call_it() const
Dont call it ;) It's for development and testing only.
static Pathname _defaultRoot
Current root directory for all operations.
static std::string expand(const std::string ¯o_r)
static void dbAccess(librpmDb::Ptr &ptr_r)
INTENTIONALLY UNDEFINED<\B> because of bug in Ptr classes which allows implicit conversion from librp...
librpmDb(const Pathname &root_r, const Pathname &dbPath_r, bool readonly_r)
Private constructor! librpmDb objects are to be created via static interface only.
~librpmDb() override
Destructor.
static void dbAccess()
Access the database at the current default location.
intrusive_ptr< librpmDb > Ptr
static unsigned blockAccess()
Blocks further access to rpmdb.
static Pathname suggestedDbPath(const Pathname &root_r)
void unref_to(unsigned refCount_r) const override
Trigger from Rep, after refCount was decreased.
static void unblockAccess()
Allow access to rpmdb e.g.
String related utilities and Regular expression matching.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Easy-to use interface to the ZYPP dependency resolver.