///////////////////////////////////////////////////////////////////
//
- // Cached RPM database retrieval via librpm.
- //
- ///////////////////////////////////////////////////////////////////
-private:
-
- class Packages;
-
- Packages & _packages;
-
- std::set<std::string> _filerequires;
-
-public:
-
- /**
- * @return Whether the list of installed packages is valid, or
- * you'd better reread it. (<B>NOTE:</B> returns valid, if not
- * initialized).
- **/
- bool packagesValid() const;
-
- /**
- * If necessary build, and return the list of all installed packages.
- **/
- const std::list<Package::Ptr> & getPackages();
-
- ///////////////////////////////////////////////////////////////////
- //
// Direct RPM database retrieval via librpm.
//
///////////////////////////////////////////////////////////////////
void getData( const std::string & name_r, const Edition & ed_r,
RpmHeader::constPtr & result_r ) const;
-
- /**
- * Create a package from RpmHeader
- * return NULL on error
- **/
-
- static Package::Ptr makePackageFromHeader( const RpmHeader::constPtr header,
- std::set<std::string> * filerequires,
- const Pathname & location, Repository repo );
-
///////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////
public:
+ /** Sync mode for \ref syncTrustedKeys */
+ enum SyncTrustedKeyBits
+ {
+ SYNC_TO_KEYRING = 1<<0, //! export rpm trusted keys into zypp trusted keyring
+ SYNC_FROM_KEYRING = 1<<1, //! import zypp trusted keys into rpm database.
+ SYNC_BOTH = SYNC_TO_KEYRING | SYNC_FROM_KEYRING
+ };
+ /**
+ * Sync trusted keys stored in rpm database and zypp trusted keyring.
+ */
+ void syncTrustedKeys( SyncTrustedKeyBits mode_r = SYNC_BOTH );
/**
* iterates through zypp keyring and import all non existant keys
* into rpm keyring
* insert all rpm trusted keys into zypp trusted keyring
*/
void exportTrustedKeysInZyppKeyRing();
+
private:
/**
* The connection to the rpm process.
protected:
void doRemovePackage( const std::string & name_r, RpmInstFlags flags, callback::SendReport<RpmRemoveReport> & report );
void doInstallPackage( const Pathname & filename, RpmInstFlags flags, callback::SendReport<RpmInstallReport> & report );
- const std::list<Package::Ptr> & doGetPackages(callback::SendReport<ScanDBReport> & report);
void doRebuildDatabase(callback::SendReport<RebuildDBReport> & report);
-
-
};
} // namespace rpm