libzypp 17.37.10

zypp::target::rpm::RpmDb Class Reference

Interface to the rpm program. More...

`#include <zypp/target/rpm/RpmDb.h>`

Inheritance diagram for zypp::target::rpm::RpmDb:

## Classes
struct | CheckPackageDetail
| Detailed rpm signature check log messages A single multiline message if CHK_OK. More...
struct | db_const_iterator
| Wrapper providing a librpmDb::db_const_iterator for this RpmDb. More...

## Public Types
enum | SyncTrustedKeyBits { SYNC_TO_KEYRING = 1<<0 , SYNC_FROM_KEYRING = 1<<1 , SYNC_BOTH = SYNC_TO_KEYRING | SYNC_FROM_KEYRING }
| Sync mode for syncTrustedKeys. More...
enum | CheckPackageResult { CHK_OK = 0 , CHK_NOTFOUND = 1 , CHK_FAIL = 2 , CHK_NOTTRUSTED = 3 , CHK_NOKEY = 4 , CHK_ERROR = 5 , CHK_NOSIG = 6 }
| checkPackage result More...
using | Error = class InstTargetError
| Default error class.
using | FileList = std::set<std::string>

## Public Member Functions
| RpmDb ()
| Constructor.
| ~RpmDb () override
| Destructor.
const Pathname & | root () const
const Pathname & | dbPath () const
bool | initialized () const
db_const_iterator | dbConstIterator () const
void | initDatabase (Pathname root_r=Pathname(), bool doRebuild_r=false)
| Prepare access to the rpm database below root_r.
void | closeDatabase ()
| Block further access to the rpm database and go back to uninitialized state.
void | rebuildDatabase ()
| Rebuild the rpm database (rpm –rebuilddb).
void | importPubkey (const PublicKey &pubkey_r)
| Import ascii armored public key in file pubkey_r.
void | removePubkey (const PublicKey &pubkey_r)
| Remove a public key from the rpm database.
std::list< PublicKey > | pubkeys () const
| Return the long ids of all installed public keys.
std::set< Edition > | pubkeyEditions () const
| Return the edition of all installed public keys.
std::list< FileInfo > | fileList (const std::string &name_r, const Edition &edition_r) const
| return complete file list for installed package name_r (in FileInfo.filename) if edition_r != Edition::noedition, check for exact edition if full==true, fill all attributes of FileInfo
bool | hasFile (const std::string &file_r, const std::string &name_r="") const
| Return true if at least one package owns a certain file (name_r empty) Return true if package name_r owns file file_r (name_r nonempty).
std::string | whoOwnsFile (const std::string &file_r) const
| Return name of package owning file or empty string if no installed package owns file.
bool | hasProvides (const std::string &tag_r) const
| Return true if at least one package provides a certain tag.
bool | hasRequiredBy (const std::string &tag_r) const
| Return true if at least one package requires a certain tag.
bool | hasConflicts (const std::string &tag_r) const
| Return true if at least one package conflicts with a certain tag.
bool | hasPackage (const std::string &name_r) const
| Return true if package is installed.
bool | hasPackage (const std::string &name_r, const Edition &ed_r) const
| Return true if package is installed in a certain edition.
void | getData (const std::string &name_r, RpmHeader::constPtr &result_r) const
| Get an installed packages data from rpmdb.
void | getData (const std::string &name_r, const Edition &ed_r, RpmHeader::constPtr &result_r) const
| Get an installed packages data from rpmdb.
void | syncTrustedKeys (SyncTrustedKeyBits mode_r=SYNC_BOTH)
| Sync trusted keys stored in rpm database and zypp trusted keyring.
void | importZyppKeyRingTrustedKeys ()
| iterates through zypp keyring and import all non-existent keys into rpm keyring
void | exportTrustedKeysInZyppKeyRing ()
| insert all rpm trusted keys into zypp trusted keyring
CheckPackageResult | checkPackage (const Pathname &path_r, CheckPackageDetail &detail_r)
| Check signature of rpm file on disk (legacy version returning CHK_OK if file is unsigned, like 'rpm -K')
CheckPackageResult | checkPackage (const Pathname &path_r)
CheckPackageResult | checkPackageSignature (const Pathname &path_r, CheckPackageDetail &detail_r)
| Check signature of rpm file on disk (strict check returning CHK_NOSIG if file is unsigned).
void | installPackage (const Pathname &filename, RpmInstFlags flags=RPMINST_NONE)
| install rpm package
void | installPackage (const Pathname &filename, RpmInstFlags flags, RpmPostTransCollector *postTransCollector_r)
void | removePackage (const std::string &name_r, RpmInstFlags flags=RPMINST_NONE)
| remove rpm package
void | removePackage (Package::constPtr package, RpmInstFlags flags=RPMINST_NONE)
void | removePackage (const std::string &name_r, RpmInstFlags flags, RpmPostTransCollector *postTransCollector_r)
void | removePackage (const Package::constPtr &package, RpmInstFlags flags, RpmPostTransCollector *postTransCollector_r)
int | runposttrans (const Pathname &filename_r, const std::function< void(const std::string &)> &output_r)
| Run collected posttrans and transfiletrigger(postun|in) if rpm --runposttrans is supported.
Pathname | getBackupPath (void)
| get backup dir for rpm config files
bool | backupPackage (const std::string &packageName)
| create tar.gz of all changed files in a Package
bool | backupPackage (const Pathname &filename)
| queries file for name and then calls above backupPackage function.
void | setBackupPath (const Pathname &path)
| set path where package backups are stored
void | createPackageBackups (bool yes)
| whether to create package backups during install or removal
bool | queryChangedFiles (FileList &fileList, const std::string &packageName)
| determine which files of an installed package have been modified.
std::ostream & | dumpOn (std::ostream &str) const override
| Dump debug info.
Public Member Functions inherited from zypp::base::ReferenceCounted
| ReferenceCounted ()
| Default ctor.
| ReferenceCounted (const ReferenceCounted &rhs)
| Copy ctor.
virtual | ~ReferenceCounted ()
| Dtor.
ReferenceCounted & | operator= (const ReferenceCounted &)
| Assignment.
unsigned | refCount () const
| Return reference counter value.
void | ref () const
| Add a reference.
void | unref () const
| Release a reference.

## Protected Member Functions
void | doRemovePackage (const std::string &name_r, RpmInstFlags flags, RpmPostTransCollector *postTransCollector_r, callback::SendReport< RpmRemoveReport > &report)
void | doInstallPackage (const Pathname &filename, RpmInstFlags flags, RpmPostTransCollector *postTransCollector_r, callback::SendReport< RpmInstallReport > &report)
void | doRebuildDatabase (callback::SendReport< RebuildDBReport > &report)
Protected Member Functions inherited from zypp::base::ReferenceCounted
virtual void | ref_to (unsigned) const
| Trigger derived classes after refCount was increased.
virtual void | unref_to (unsigned) const
| Trigger derived classes after refCount was decreased.

## Private Types
using | RpmArgVec = std::vector<const char *>

## Private Member Functions
void | run_rpm (const RpmArgVec &options, ExternalProgram::Stderr_Disposition stderr_disp=ExternalProgram::Stderr_To_Stdout)
| Run rpm with the specified arguments and handle stderr.
bool | systemReadLine (std::string &line)
| Read a line from the general rpm query.
int | systemStatus ()
| Return the exit status of the general rpm process, closing the connection if not already done.
void | systemKill ()
| Forcably kill the system process.
void | processConfigFiles (const std::string &line, const std::string &name, const char *typemsg, const char *difffailmsg, const char *diffgenmsg)
| handle rpm messages like "/etc/testrc saved as /etc/testrc.rpmorig"

## Private Attributes
Pathname | _root
| Root directory for all operations.
Pathname | _dbPath
| Directory that contains the rpmdb.
ExternalProgram * | process
| The connection to the rpm process.
int | exit_code
| The exit code of the rpm process, or -1 if not yet known.
std::string | error_message
| Error message from running rpm as external program.
Pathname | _backuppath
| /var/adm/backup
bool | _packagebackups
| create package backups?

## Additional Inherited Members
Static Public Member Functions inherited from zypp::base::ReferenceCounted
static void | add_ref (const ReferenceCounted *ptr_r)
| Called by zypp::intrusive_ptr to add a reference.
static void | release (const ReferenceCounted *ptr_r)
| Called by zypp::intrusive_ptr to add a reference.
Related Symbols inherited from zypp::base::ReferenceCounted
void | intrusive_ptr_add_ref (const ReferenceCounted *ptr_r)
| intrusive_ptr hook to add_ref.
void | intrusive_ptr_release (const ReferenceCounted *ptr_r)
| intrusive_ptr hook to release.
std::ostream & | operator<< (std::ostream &str, const ReferenceCounted &obj)
| Stream output.

## Detailed Description

Interface to the rpm program.

Definition at line 50 of file RpmDb.h.

## Member Typedef Documentation

## ◆ Error

using zypp::target::rpm::RpmDb::Error = class InstTargetError

Default error class.

Definition at line 57 of file RpmDb.h.

## ◆ RpmArgVec

using zypp::target::rpm::RpmDb::RpmArgVec = std::vector<const char *>
| private

Definition at line 303 of file RpmDb.h.

## ◆ FileList

using zypp::target::rpm::RpmDb::FileList = std::set<std::string>

Definition at line 370 of file RpmDb.h.

## Member Enumeration Documentation

## ◆ SyncTrustedKeyBits

enum zypp::target::rpm::RpmDb::SyncTrustedKeyBits

Sync mode for syncTrustedKeys.

Enumerator
SYNC_TO_KEYRING | export rpm trusted keys into zypp trusted keyring
SYNC_FROM_KEYRING | import zypp trusted keys into rpm database.
SYNC_BOTH |

Definition at line 277 of file RpmDb.h.

## ◆ CheckPackageResult

enum zypp::target::rpm::RpmDb::CheckPackageResult

checkPackage result

See also
  checkPackage

Enumerator
CHK_OK | Signature is OK.
CHK_NOTFOUND | Signature is unknown type.
CHK_FAIL | Signature does not verify.
CHK_NOTTRUSTED | Signature is OK, but key is not trusted.
CHK_NOKEY | Public key is unavailable.
CHK_ERROR | File does not exist or can't be opened.
CHK_NOSIG | File has no gpg signature (only digests).

Definition at line 376 of file RpmDb.h.

## Constructor & Destructor Documentation

## ◆ RpmDb()

zypp::target::rpm::RpmDb::RpmDb | ( |  | ) |

Constructor.

There's no rpmdb access until initDatabase was called.

Definition at line 204 of file RpmDb.cc.

## ◆ ~RpmDb()

zypp::target::rpm::RpmDb::~RpmDb | ( |  | ) |
| override

Destructor.

Definition at line 223 of file RpmDb.cc.

## Member Function Documentation

## ◆ root()

const Pathname & zypp::target::rpm::RpmDb::root | ( |  | ) | const
| inline

Returns
  Root directory for all operations (empty if not initialized).

Definition at line 109 of file RpmDb.h.

## ◆ dbPath()

const Pathname & zypp::target::rpm::RpmDb::dbPath | ( |  | ) | const
| inline

Returns
  Directory that contains the rpmdb (empty if not initialized).

Definition at line 117 of file RpmDb.h.

## ◆ initialized()

bool zypp::target::rpm::RpmDb::initialized | ( |  | ) | const
| inline

Returns
  Whether we are initialized.

Definition at line 125 of file RpmDb.h.

## ◆ dbConstIterator()

RpmDb::db_const_iterator zypp::target::rpm::RpmDb::dbConstIterator | ( |  | ) | const

Returns
  db_const_iterator for this rpmdb (empty if not initialized)

Definition at line 244 of file RpmDb.cc.

## ◆ initDatabase()

void zypp::target::rpm::RpmDb::initDatabase | ( | Pathname | root_r = Pathname(),
|  | bool | doRebuild_r = false )

Prepare access to the rpm database below root_r.

An optional argument denotes the root directory for all operations. If an empty Pathname is given the default (``/) is used.

Calling initDatabase a second time with different arguments will return an error but leave the database in its original state.

If the database already exists and `doRebuild_r` is true, rebuildDatabase is called.

Exceptions

  RpmException |

Definition at line 257 of file RpmDb.cc.

## ◆ closeDatabase()

void zypp::target::rpm::RpmDb::closeDatabase | ( |  | ) |

Block further access to the rpm database and go back to uninitialized state.

On update: Decides what to do with any converted database (see initDatabase).

Exceptions

  RpmException |

Definition at line 328 of file RpmDb.cc.

## ◆ rebuildDatabase()

void zypp::target::rpm::RpmDb::rebuildDatabase | ( |  | ) |

Rebuild the rpm database (rpm –rebuilddb).

Exceptions

  RpmException |

Definition at line 348 of file RpmDb.cc.

## ◆ importPubkey()

void zypp::target::rpm::RpmDb::importPubkey | ( | const PublicKey & | pubkey_r | ) |

Import ascii armored public key in file pubkey_r.

Exceptions

  RpmException |

Definition at line 660 of file RpmDb.cc.

## ◆ removePubkey()

void zypp::target::rpm::RpmDb::removePubkey | ( | const PublicKey & | pubkey_r | ) |

Remove a public key from the rpm database.

Exceptions

  RpmException |

Definition at line 773 of file RpmDb.cc.

## ◆ pubkeys()

std::list< PublicKey > zypp::target::rpm::RpmDb::pubkeys | ( |  | ) | const

Return the long ids of all installed public keys.

Definition at line 840 of file RpmDb.cc.

## ◆ pubkeyEditions()

std::set< Edition > zypp::target::rpm::RpmDb::pubkeyEditions | ( |  | ) | const

Return the edition of all installed public keys.

Definition at line 878 of file RpmDb.cc.

## ◆ fileList()

std::list< FileInfo > zypp::target::rpm::RpmDb::fileList | ( | const std::string & | name_r,
|  | const Edition & | edition_r ) const

return complete file list for installed package name_r (in FileInfo.filename) if edition_r != Edition::noedition, check for exact edition if full==true, fill all attributes of FileInfo

Definition at line 902 of file RpmDb.cc.

## ◆ hasFile()

bool zypp::target::rpm::RpmDb::hasFile | ( | const std::string & | file_r,
|  | const std::string & | name_r = "" ) const

Return true if at least one package owns a certain file (name_r empty) Return true if package name_r owns file file_r (name_r nonempty).

Definition at line 931 of file RpmDb.cc.

## ◆ whoOwnsFile()

std::string zypp::target::rpm::RpmDb::whoOwnsFile | ( | const std::string & | file_r | ) | const

Return name of package owning file or empty string if no installed package owns file.

Definition at line 957 of file RpmDb.cc.

## ◆ hasProvides()

bool zypp::target::rpm::RpmDb::hasProvides | ( | const std::string & | tag_r | ) | const

Return true if at least one package provides a certain tag.

Definition at line 975 of file RpmDb.cc.

## ◆ hasRequiredBy()

bool zypp::target::rpm::RpmDb::hasRequiredBy | ( | const std::string & | tag_r | ) | const

Return true if at least one package requires a certain tag.

Definition at line 989 of file RpmDb.cc.

## ◆ hasConflicts()

bool zypp::target::rpm::RpmDb::hasConflicts | ( | const std::string & | tag_r | ) | const

Return true if at least one package conflicts with a certain tag.

Definition at line 1003 of file RpmDb.cc.

## ◆ hasPackage() [1/2]

bool zypp::target::rpm::RpmDb::hasPackage | ( | const std::string & | name_r | ) | const

Return true if package is installed.

Definition at line 1017 of file RpmDb.cc.

## ◆ hasPackage() [2/2]

bool zypp::target::rpm::RpmDb::hasPackage | ( | const std::string & | name_r,
|  | const Edition & | ed_r ) const

Return true if package is installed in a certain edition.

Definition at line 1031 of file RpmDb.cc.

## ◆ getData() [1/2]

void zypp::target::rpm::RpmDb::getData | ( | const std::string & | name_r,
|  | RpmHeader::constPtr & | result_r ) const

Get an installed packages data from rpmdb.

Package is identified by name. Data returned via result are NULL, if packge is not installed (PMError is not set), or RPM database could not be read (PMError is set).

Exceptions

  RpmException |

FIXME this and following comment

Definition at line 1045 of file RpmDb.cc.

## ◆ getData() [2/2]

void zypp::target::rpm::RpmDb::getData | ( | const std::string & | name_r,
|  | const Edition & | ed_r,
|  | RpmHeader::constPtr & | result_r ) const

Get an installed packages data from rpmdb.

Package is identified by name and edition. Data returned via result are NULL, if packge is not installed (PMError is not set), or RPM database could not be read (PMError is set).

Exceptions

  RpmException |

Definition at line 1065 of file RpmDb.cc.

## ◆ syncTrustedKeys()

void zypp::target::rpm::RpmDb::syncTrustedKeys | ( | SyncTrustedKeyBits | mode_r = SYNC_BOTH | ) |

Sync trusted keys stored in rpm database and zypp trusted keyring.

Definition at line 547 of file RpmDb.cc.

## ◆ importZyppKeyRingTrustedKeys()

void zypp::target::rpm::RpmDb::importZyppKeyRingTrustedKeys | ( |  | ) |

iterates through zypp keyring and import all non-existent keys into rpm keyring

Definition at line 648 of file RpmDb.cc.

## ◆ exportTrustedKeysInZyppKeyRing()

void zypp::target::rpm::RpmDb::exportTrustedKeysInZyppKeyRing | ( |  | ) |

insert all rpm trusted keys into zypp trusted keyring

Definition at line 651 of file RpmDb.cc.

## ◆ run_rpm()

void zypp::target::rpm::RpmDb::run_rpm | ( | const RpmArgVec & | options,
|  | ExternalProgram::Stderr_Disposition | stderr_disp = ExternalProgram::Stderr_To_Stdout )
| private

Run rpm with the specified arguments and handle stderr.

Parameters

  n_opts | The number of arguments
  options | Array of the arguments, n_opts elements
  stderr_disp | How to handle stderr, merged with stdout by default

Exceptions

  RpmException |

Definition at line 1400 of file RpmDb.cc.

## ◆ systemReadLine()

bool zypp::target::rpm::RpmDb::systemReadLine | ( | std::string & | line | ) |
| private

Read a line from the general rpm query.

Definition at line 1449 of file RpmDb.cc.

## ◆ systemStatus()

int zypp::target::rpm::RpmDb::systemStatus | ( |  | ) |
| private

Return the exit status of the general rpm process, closing the connection if not already done.

Definition at line 1502 of file RpmDb.cc.

## ◆ systemKill()

void zypp::target::rpm::RpmDb::systemKill | ( |  | ) |
| private

Forcably kill the system process.

Definition at line 1525 of file RpmDb.cc.

## ◆ processConfigFiles()

void zypp::target::rpm::RpmDb::processConfigFiles | ( | const std::string & | line,
|  | const std::string & | name,
|  | const char * | typemsg,
|  | const char * | difffailmsg,
|  | const char * | diffgenmsg )
| private

handle rpm messages like "/etc/testrc saved as /etc/testrc.rpmorig"

Parameters

  line | rpm output starting with warning:
  name | name of package, appears in subject line
  typemsg | " saved as " or " created as "
  difffailmsg | what to put into mail if diff failed, must contain two s for the two files
  diffgenmsg | what to put into mail if diff succeeded, must contain two s for the two files

Definition at line 1532 of file RpmDb.cc.

## ◆ checkPackage() [1/2]

RpmDb::CheckPackageResult zypp::target::rpm::RpmDb::checkPackage | ( | const Pathname & | path_r,
|  | CheckPackageDetail & | detail_r )

Check signature of rpm file on disk (legacy version returning CHK_OK if file is unsigned, like 'rpm -K')

Parameters

  path_r | which file to check
  detail_r | Return detailed rpm log messages

Returns
  CheckPackageResult (CHK_OK if file is unsigned)

See also
  also checkPackageSignature

Definition at line 1323 of file RpmDb.cc.

## ◆ checkPackage() [2/2]

RpmDb::CheckPackageResult zypp::target::rpm::RpmDb::checkPackage | ( | const Pathname & | path_r | ) |

Definition at line 1326 of file RpmDb.cc.

## ◆ checkPackageSignature()

RpmDb::CheckPackageResult zypp::target::rpm::RpmDb::checkPackageSignature | ( | const Pathname & | path_r,
|  | RpmDb::CheckPackageDetail & | detail_r )

Check signature of rpm file on disk (strict check returning CHK_NOSIG if file is unsigned).

Parameters

  path_r | which file to check
  detail_r | Return detailed rpm log messages

Returns
  CheckPackageResult (CHK_NOSIG if file is unsigned)

See also
  also checkPackage

Definition at line 1329 of file RpmDb.cc.

## ◆ installPackage() [1/2]

void zypp::target::rpm::RpmDb::installPackage | ( | const Pathname & | filename,
|  | RpmInstFlags | flags = RPMINST_NONE )

install rpm package

Parameters

  filename | file to install
  flags | which rpm options to use

Returns
  success

Exceptions

  RpmException |

Definition at line 1627 of file RpmDb.cc.

## ◆ installPackage() [2/2]

void zypp::target::rpm::RpmDb::installPackage | ( | const Pathname & | filename,
|  | RpmInstFlags | flags,
|  | RpmPostTransCollector * | postTransCollector_r )

Definition at line 1630 of file RpmDb.cc.

## ◆ removePackage() [1/4]

void zypp::target::rpm::RpmDb::removePackage | ( | const std::string & | name_r,
|  | RpmInstFlags | flags = RPMINST_NONE )

remove rpm package

Parameters

  name_r | Name of the rpm package to remove.
  iflags | which rpm options to use

Returns
  success

Exceptions

  RpmException |

Definition at line 1833 of file RpmDb.cc.

## ◆ removePackage() [2/4]

void zypp::target::rpm::RpmDb::removePackage | ( | Package::constPtr | package,
|  | RpmInstFlags | flags = RPMINST_NONE )

Definition at line 1830 of file RpmDb.cc.

## ◆ removePackage() [3/4]

void zypp::target::rpm::RpmDb::removePackage | ( | const std::string & | name_r,
|  | RpmInstFlags | flags,
|  | RpmPostTransCollector * | postTransCollector_r )

Definition at line 1844 of file RpmDb.cc.

## ◆ removePackage() [4/4]

void zypp::target::rpm::RpmDb::removePackage | ( | const Package::constPtr & | package,
|  | RpmInstFlags | flags,
|  | RpmPostTransCollector * | postTransCollector_r )

Definition at line 1836 of file RpmDb.cc.

## ◆ runposttrans()

int zypp::target::rpm::RpmDb::runposttrans | ( | const Pathname & | filename_r,
|  | const std::function< void(const std::string &)> & | output_r )

Run collected posttrans and transfiletrigger(postun|in) if rpm --runposttrans is supported.

Output-function receives a "RIPOFF:%scriptident(packageident)" line for every script that is executed followed by lines the script outputs to stout/stderr.

Definition at line 2003 of file RpmDb.cc.

## ◆ getBackupPath()

Pathname zypp::target::rpm::RpmDb::getBackupPath | ( | void |  | ) |
| inline

get backup dir for rpm config files

Definition at line 460 of file RpmDb.h.

## ◆ backupPackage() [1/2]

bool zypp::target::rpm::RpmDb::backupPackage | ( | const std::string & | packageName | ) |

create tar.gz of all changed files in a Package

Parameters

  packageName | name of the Package to backup

See also
  setBackupPath

Definition at line 2076 of file RpmDb.cc.

## ◆ backupPackage() [2/2]

bool zypp::target::rpm::RpmDb::backupPackage | ( | const Pathname & | filename | ) |

queries file for name and then calls above backupPackage function.

For convenience.

Parameters

  filename | rpm file that is about to be installed

Definition at line 2061 of file RpmDb.cc.

## ◆ setBackupPath()

void zypp::target::rpm::RpmDb::setBackupPath | ( | const Pathname & | path | ) |

set path where package backups are stored

See also
  backupPackage

Definition at line 2203 of file RpmDb.cc.

## ◆ createPackageBackups()

void zypp::target::rpm::RpmDb::createPackageBackups | ( | bool | yes | ) |
| inline

whether to create package backups during install or removal

Parameters

  yes | true or false

Definition at line 495 of file RpmDb.h.

## ◆ queryChangedFiles()

bool zypp::target::rpm::RpmDb::queryChangedFiles | ( | FileList & | fileList,
|  | const std::string & | packageName )

determine which files of an installed package have been modified.

Parameters

  fileList | (output) where to store modified files
  packageName | name of package to query

Returns
  false if package couln't be queried for some reason

Definition at line 1335 of file RpmDb.cc.

## ◆ dumpOn()

std::ostream & zypp::target::rpm::RpmDb::dumpOn | ( | std::ostream & | str | ) | const
| override virtual

Dump debug info.

Reimplemented from zypp::base::ReferenceCounted.

Definition at line 238 of file RpmDb.cc.

## ◆ doRemovePackage()

void zypp::target::rpm::RpmDb::doRemovePackage | ( | const std::string & | name_r,
|  | RpmInstFlags | flags,
|  | RpmPostTransCollector * | postTransCollector_r,
|  | callback::SendReport< RpmRemoveReport > & | report )
| protected

Definition at line 1874 of file RpmDb.cc.

## ◆ doInstallPackage()

void zypp::target::rpm::RpmDb::doInstallPackage | ( | const Pathname & | filename,
|  | RpmInstFlags | flags,
|  | RpmPostTransCollector * | postTransCollector_r,
|  | callback::SendReport< RpmInstallReport > & | report )
| protected

Definition at line 1663 of file RpmDb.cc.

## ◆ doRebuildDatabase()

void zypp::target::rpm::RpmDb::doRebuildDatabase | ( | callback::SendReport< RebuildDBReport > & | report | ) |
| protected

Definition at line 366 of file RpmDb.cc.

## Member Data Documentation

## ◆ _root

Pathname zypp::target::rpm::RpmDb::_root
| private

Root directory for all operations.

Definition at line 86 of file RpmDb.h.

## ◆ _dbPath

Pathname zypp::target::rpm::RpmDb::_dbPath
| private

Directory that contains the rpmdb.

Definition at line 91 of file RpmDb.h.

## ◆ process

ExternalProgram* zypp::target::rpm::RpmDb::process
| private

The connection to the rpm process.

Definition at line 301 of file RpmDb.h.

## ◆ exit_code

int zypp::target::rpm::RpmDb::exit_code
| private

The exit code of the rpm process, or -1 if not yet known.

Definition at line 338 of file RpmDb.h.

## ◆ error_message

std::string zypp::target::rpm::RpmDb::error_message
| private

Error message from running rpm as external program.

Use only if something fail.

Definition at line 344 of file RpmDb.h.

## ◆ _backuppath

Pathname zypp::target::rpm::RpmDb::_backuppath
| private

/var/adm/backup

Definition at line 347 of file RpmDb.h.

## ◆ _packagebackups

bool zypp::target::rpm::RpmDb::_packagebackups
| private

create package backups?

Definition at line 350 of file RpmDb.h.

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

- zypp/target/rpm/RpmDb.h
- zypp/target/rpm/RpmDb.cc