15#ifndef ZYPP_TARGET_RPM_RPMDB_H
16#define ZYPP_TARGET_RPM_RPMDB_H
40class RpmPostTransCollector;
127 return( ! _root.
empty() );
159 void closeDatabase();
167 void rebuildDatabase();
188 std::list<PublicKey> pubkeys()
const;
193 std::set<Edition> pubkeyEditions()
const;
213 bool hasFile(
const std::string &
file_r,
const std::string &
name_r =
"" )
const;
219 std::string whoOwnsFile(
const std::string &
file_r )
const;
224 bool hasProvides(
const std::string &
tag_r )
const;
229 bool hasRequiredBy(
const std::string &
tag_r )
const;
234 bool hasConflicts(
const std::string &
tag_r )
const;
239 bool hasPackage(
const std::string &
name_r )
const;
257 void getData(
const std::string &
name_r,
279 SYNC_TO_KEYRING = 1<<0,
280 SYNC_FROM_KEYRING = 1<<1,
281 SYNC_BOTH = SYNC_TO_KEYRING | SYNC_FROM_KEYRING
286 void syncTrustedKeys( SyncTrustedKeyBits
mode_r = SYNC_BOTH );
291 void importZyppKeyRingTrustedKeys();
295 void exportTrustedKeysInZyppKeyRing();
316 ExternalProgram::Stderr_To_Stdout);
322 bool systemReadLine(std::string &
line);
361 void processConfigFiles(
const std::string&
line,
362 const std::string& name,
430 void installPackage (
const Pathname & filename, RpmInstFlags flags = RPMINST_NONE );
444 void removePackage(
const std::string &
name_r, RpmInstFlags flags = RPMINST_NONE );
445 void removePackage(
Package::constPtr package, RpmInstFlags flags = RPMINST_NONE );
472 bool backupPackage(
const std::string&
packageName);
480 bool backupPackage(
const Pathname& filename);
487 void setBackupPath(
const Pathname& path);
497 _packagebackups = yes;
510 bool queryChangedFiles(FileList & fileList,
const std::string&
packageName);
517 std::ostream &
dumpOn( std::ostream &
str )
const override;
Subclass to retrieve rpm database content.
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Edition represents [epoch:]version[-release]
Execute a program and give access to its io An object of this class encapsulates the execution of an ...
Stderr_Disposition
Define symbols for different policies on the handling of stderr.
TraitsType::constPtrType constPtr
Base class for reference counted objects.
bool empty() const
Test for an empty path.
Extract and remember posttrans scripts for later execution.
Interface to the rpm program.
std::string error_message
Error message from running rpm as external program.
std::vector< const char * > RpmArgVec
Pathname _backuppath
/var/adm/backup
ExternalProgram * process
The connection to the rpm process.
SyncTrustedKeyBits
Sync mode for syncTrustedKeys.
std::set< std::string > FileList
const Pathname & root() const
void createPackageBackups(bool yes)
whether to create package backups during install or removal
const Pathname & dbPath() const
Pathname _dbPath
Directory that contains the rpmdb.
bool _packagebackups
create package backups?
Pathname getBackupPath(void)
get backup dir for rpm config files
Pathname _root
Root directory for all operations.
int exit_code
The exit code of the rpm process, or -1 if not yet known.
CheckPackageResult
checkPackage result
Manage access to librpm database.
String related utilities and Regular expression matching.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
std::ostream & operator<<(std::ostream &str, const librpmDb::db_const_iterator &obj)
Easy-to use interface to the ZYPP dependency resolver.
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Detailed rpm signature check log messages A single multiline message if CHK_OK.
Wrapper providing a librpmDb::db_const_iterator for this RpmDb.
db_const_iterator(const Pathname &root_r, const Pathname &dbPath_r)