zypp::target::rpm::librpmDb::DbDirInfo Class Reference

Collect info about what kind of rpmdb seems to be present by looking at paths and filenames. More...

#include <librpmDb.h>

List of all members.

Public Member Functions

 DbDirInfo (const Pathname &root_r, const Pathname &dbPath_r)
 For Constructor arguments see accessPath.
const Pathname & root () const
 Root directory for all operations.
const Pathname & dbPath () const
 Directory that contains the rpmdb.
const PathInfo & dbDir () const
 database directory (unset on illegal constructor arguments)
const PathInfo & dbV4 () const
 rpmV4 database (_dbDir/Packages)
const PathInfo & dbV3 () const
 rpmV3 database (_dbDir/packages.rpm)
const PathInfo & dbV3ToV4 () const
 rpmV3 database backup created on conversion to rpmV4 (_dbDir/packages.rpm3)
void restat ()
 Restat all paths.
bool illegalArgs () const
 Whether constructor arguments were illegal.
bool usableArgs () const
 Whether constructor arguments were llegal and dbDir either is a directory or may be created (path does not exist).
bool hasDbDir () const
 Whether dbDir directory exists.
bool hasDbV4 () const
 Whether dbV4 file exists.
bool hasDbV3 () const
 Whether dbV3 file exists.
bool hasDbV3ToV4 () const
 Whether dbV3ToV4 file exists.

Private Attributes

Pathname _root
 Root directory for all operations.
Pathname _dbPath
 Directory that contains the rpmdb.
PathInfo _dbDir
 database directory (unset on illegal constructor arguments)
PathInfo _dbV4
 rpmV4 database (_dbDir/Packages)
PathInfo _dbV3
 rpmV3 database (_dbDir/packages.rpm)
PathInfo _dbV3ToV4
 rpmV3 database backup created on conversion to rpmV4 (_dbDir/packages.rpm3)

Friends

std::ostream & operator<< (std::ostream &str, const DbDirInfo &obj)


Detailed Description

Collect info about what kind of rpmdb seems to be present by looking at paths and filenames.

Definition at line 327 of file librpmDb.h.


Constructor & Destructor Documentation

zypp::target::rpm::librpmDb::DbDirInfo::DbDirInfo ( const Pathname &  root_r,
const Pathname &  dbPath_r 
)

For Constructor arguments see accessPath.

On illegal arguments _dbDir is unset.

Definition at line 527 of file librpmDb.cc.

References _dbDir, _dbPath, _dbV3, _dbV3ToV4, _dbV4, _root, DBG, and ERR.


Member Function Documentation

const Pathname& zypp::target::rpm::librpmDb::DbDirInfo::root (  )  const [inline]

Root directory for all operations.

Definition at line 376 of file librpmDb.h.

References _root.

Referenced by zypp::target::rpm::operator<<().

const Pathname& zypp::target::rpm::librpmDb::DbDirInfo::dbPath (  )  const [inline]

Directory that contains the rpmdb.

Definition at line 384 of file librpmDb.h.

References _dbPath.

Referenced by zypp::target::rpm::operator<<().

const PathInfo& zypp::target::rpm::librpmDb::DbDirInfo::dbDir (  )  const [inline]

database directory (unset on illegal constructor arguments)

Definition at line 392 of file librpmDb.h.

References _dbDir.

Referenced by zypp::target::rpm::RpmDb::internal_initDatabase().

const PathInfo& zypp::target::rpm::librpmDb::DbDirInfo::dbV4 (  )  const [inline]

rpmV4 database (_dbDir/Packages)

Definition at line 400 of file librpmDb.h.

References _dbV4.

Referenced by zypp::target::rpm::RpmDb::internal_initDatabase().

const PathInfo& zypp::target::rpm::librpmDb::DbDirInfo::dbV3 (  )  const [inline]

rpmV3 database (_dbDir/packages.rpm)

Definition at line 408 of file librpmDb.h.

References _dbV3.

Referenced by zypp::target::rpm::RpmDb::internal_initDatabase().

const PathInfo& zypp::target::rpm::librpmDb::DbDirInfo::dbV3ToV4 (  )  const [inline]

rpmV3 database backup created on conversion to rpmV4 (_dbDir/packages.rpm3)

Definition at line 416 of file librpmDb.h.

References _dbV3ToV4.

Referenced by zypp::target::rpm::RpmDb::internal_initDatabase().

void zypp::target::rpm::librpmDb::DbDirInfo::restat (  ) 

Restat all paths.

Definition at line 552 of file librpmDb.cc.

References _dbDir, _dbV3, _dbV3ToV4, _dbV4, and DBG.

Referenced by zypp::target::rpm::RpmDb::internal_initDatabase().

bool zypp::target::rpm::librpmDb::DbDirInfo::illegalArgs (  )  const [inline]

Whether constructor arguments were illegal.

Definition at line 433 of file librpmDb.h.

References _dbDir.

Referenced by zypp::target::rpm::RpmDb::internal_initDatabase(), and zypp::target::rpm::operator<<().

bool zypp::target::rpm::librpmDb::DbDirInfo::usableArgs (  )  const [inline]

Whether constructor arguments were llegal and dbDir either is a directory or may be created (path does not exist).

Definition at line 442 of file librpmDb.h.

References _dbDir.

Referenced by zypp::target::rpm::RpmDb::internal_initDatabase().

bool zypp::target::rpm::librpmDb::DbDirInfo::hasDbDir (  )  const [inline]

Whether dbDir directory exists.

Definition at line 450 of file librpmDb.h.

References _dbDir.

bool zypp::target::rpm::librpmDb::DbDirInfo::hasDbV4 (  )  const [inline]

Whether dbV4 file exists.

Definition at line 458 of file librpmDb.h.

References _dbV4.

Referenced by zypp::target::rpm::RpmDb::internal_initDatabase().

bool zypp::target::rpm::librpmDb::DbDirInfo::hasDbV3 (  )  const [inline]

Whether dbV3 file exists.

Definition at line 466 of file librpmDb.h.

References _dbV3.

Referenced by zypp::target::rpm::RpmDb::internal_initDatabase().

bool zypp::target::rpm::librpmDb::DbDirInfo::hasDbV3ToV4 (  )  const [inline]

Whether dbV3ToV4 file exists.

Definition at line 474 of file librpmDb.h.

References _dbV3ToV4.

Referenced by zypp::target::rpm::RpmDb::internal_initDatabase().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  str,
const DbDirInfo obj 
) [friend]

Definition at line 567 of file librpmDb.cc.


Member Data Documentation

Root directory for all operations.

Definition at line 336 of file librpmDb.h.

Referenced by DbDirInfo(), and root().

Directory that contains the rpmdb.

Definition at line 341 of file librpmDb.h.

Referenced by DbDirInfo(), and dbPath().

database directory (unset on illegal constructor arguments)

Definition at line 346 of file librpmDb.h.

Referenced by dbDir(), DbDirInfo(), hasDbDir(), illegalArgs(), zypp::target::rpm::operator<<(), restat(), and usableArgs().

rpmV4 database (_dbDir/Packages)

Definition at line 351 of file librpmDb.h.

Referenced by DbDirInfo(), dbV4(), hasDbV4(), zypp::target::rpm::operator<<(), and restat().

rpmV3 database (_dbDir/packages.rpm)

Definition at line 356 of file librpmDb.h.

Referenced by DbDirInfo(), dbV3(), hasDbV3(), zypp::target::rpm::operator<<(), and restat().

rpmV3 database backup created on conversion to rpmV4 (_dbDir/packages.rpm3)

Definition at line 361 of file librpmDb.h.

Referenced by DbDirInfo(), dbV3ToV4(), hasDbV3ToV4(), zypp::target::rpm::operator<<(), and restat().


The documentation for this class was generated from the following files:

doxygen