40 using Ptr = intrusive_ptr<librpmDb>;
41 using constPtr = intrusive_ptr<const librpmDb>;
125 static std::string
expand(
const std::string & macro_r );
132 return std::string(
"'(" ) + root_r.
asString() +
")" + sub_r.
asString() +
"'";
277 void unref_to(
unsigned refCount_r )
const override;
300 shared_ptr<RpmException>
error()
const;
318 unsigned size()
const;
330 std::ostream &
dumpOn( std::ostream &
str )
const override;
380 shared_ptr<RpmException> dbError()
const;
391 unsigned dbHdrNum()
const;
422 bool findByFile(
const std::string & file_r );
427 bool findByProvides(
const std::string & tag_r );
432 bool findByRequiredBy(
const std::string & tag_r );
437 bool findByConflicts(
const std::string & tag_r );
449 bool findByName(
const std::string & name_r );
460 bool findPackage(
const std::string & name_r );
466 bool findPackage(
const std::string & name_r,
const Edition & ed_r );
void * dont_call_it() const
Dont call it ;) It's for development and testing only.
TraitsType::constPtrType constPtr
static const Pathname & defaultRoot()
static std::string expand(const std::string ¯o_r)
static void dbAccess()
Access the database at the current default location.
std::ostream & operator<<(std::ostream &str, const librpmDb::db_const_iterator &obj)
static bool _dbBlocked ZYPP_API
Whether access is blocked (no _defaultDb will be available).
String related utilities and Regular expression matching.
Edition represents [epoch:]version[-release]
~librpmDb() override
Destructor.
static void unblockAccess() ZYPP_API
Allow access to rpmdb e.g.
static librpmDb::constPtr _defaultDb
Current rpmdb handle.
std::ostream & dumpOn(std::ostream &str) const override
Dump debug info.
static librpmDb * newLibrpmDb()
For internal use.
const std::string & asString() const
String representation.
static Pathname _rpmDefaultDbPath
_dbpath configured in rpm config.
static Pathname _defaultRoot
Current root directory for all operations.
static const Pathname & defaultDbPath()
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
intrusive_ptr< librpmDb > Ptr
shared_ptr< RpmException > error() const
Return any database error.
Base class for reference counted objects.
const Pathname & root() const
Manage access to librpm database.
static unsigned blockAccess() ZYPP_API
Blocks further access to rpmdb.
static Pathname _defaultDbPath
Current directory (below root) that contains the rpmdb.
void unref_to(unsigned refCount_r) const override
Trigger from Rep, after refCount was decreased.
static bool isBlocked() ZYPP_API
librpmDb internal database handle
static bool globalInit()
Initialize lib librpm (read configfiles etc.).
const Pathname & dbPath() const
const RpmHeader::constPtr & operator->() const
Forwards to the current RpmHeader::constPtr.
static unsigned dbRelease(bool force_r=false) ZYPP_API
If there are no outstanding references to the database (e.g.
intrusive_ptr< const librpmDb > constPtr
Easy-to use interface to the ZYPP dependency resolver.
static Pathname suggestedDbPath(const Pathname &root_r)
static std::ostream & dumpState(std::ostream &str)
Dump debug info.
static std::string stringPath(const Pathname &root_r, const Pathname &sub_r)
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.