Deepsolver
|
The main class for package managing. More...
Public Member Functions | |
void | closure (const UserTaskItemToInstallVector &toInstall, PkgVector &res) |
Restores all dependencies for specified package set. | |
void | fetchMetadata (AbstractFetchListener &listener, const AbstractOperationContinueRequest &continueRequest) |
Fetchs fresh metadata of attached repositories. | |
void | generateSat (AbstractTransactionListener &listener, const UserTask &task, std::ostream &s) |
Generates SAT and saves it as a string. | |
void | getPkgNames (bool withInstalled, StringVector &res) |
Fills the string vector with the list of all known packages (names only, without provides) | |
OperationCore (const ConfigCenter &conf) | |
The constructor. | |
void | printPackagesByRequire (const NamedPkgRel &rel, std::ostream &s) |
Print to stream the list of packages matching to a require. | |
void | printSnapshot (bool withInstalled, bool withIds, std::ostream &s) |
Dumps the current package snapshot to stream in a string form. | |
TransactionIterator::Ptr | transaction (AbstractTransactionListener &listener, const UserTask &task) |
INitiates new transaction. | |
virtual | ~OperationCore () |
The destructor. |
The OperationCore class is the central class of Deepsolver project. It allows every client to perform various manipulations with packages, including installation, removing and upgrading. In addition, this class takes care of information gathered about attached repositories.
Be careful, each method of the OperationCore class throws a number of exceptions. Their exact set depends on particular method purpose.
The main structure used for configuring is a ConfigCenter class instance provided by a reference to constructor.
According to accepted project design, there are two additional classes purposed for direct usage by clients. They are IndexCore and InfoCore. The former takes care about repository metadata construction and the second provides various information about known packages. OperationCore, IndexCore and InfoCore are the main classes a end-user should be interested in.
Deepsolver::OperationCore::OperationCore | ( | const ConfigCenter & | conf | ) | [inline] |
[in] | conf | The reference to a configuration data |
void OperationCore::closure | ( | const UserTaskItemToInstallVector & | toInstall, |
PkgVector & | res | ||
) |
This method returns the changes needed for the installation of the specified package set into initially empty system. Obviously, this situation is artificial and never happens in practise. None changes are actually made and this method just returns the list of the packages to fill the empty system with.
[in] | toInstall | The list of the packages to "install" into an empty system |
[out] | res | The constructed list of packages with all necessary dependencies |
OperationCoreException | TaskException SystemException InternalProblemException |
void OperationCore::fetchMetadata | ( | AbstractFetchListener & | listener, |
const AbstractOperationContinueRequest & | continueRequest | ||
) |
[in] | listener | The reference to a listener to follow fetching progress |
[in] | continueRequest | The reference to an object for fetching interruption by user request |
OperationException | CurlException SystemException InternalException |
void OperationCore::generateSat | ( | AbstractTransactionListener & | listener, |
const UserTask & | task, | ||
std::ostream & | s | ||
) |
[in] | listener | The reference to an object to follow calculation progress |
[in] | task | The reference to task object to generate SAT for |
[in] | s | The reference to a stream to save generated SAT in |
OperationException | TaskException SystemException InternalException |
void OperationCore::getPkgNames | ( | bool | withInstalled, |
StringVector & | res | ||
) |
[in] | withInstalled | Whether to include installed packages or not |
[out] | res | The string list to save names of known packages to |
OperationCoreException | SystemException InternalProblemException |
void OperationCore::printPackagesByRequire | ( | const NamedPkgRel & | rel, |
std::ostream & | s | ||
) |
[in] | rel | The require entry to search packages for |
[in] | s | The stream to print to |
OperationCoreException | SystemException InternalProblemException |
void OperationCore::printSnapshot | ( | bool | withInstalled, |
bool | withIds, | ||
std::ostream & | s | ||
) |
[in] | withInstalled | Whether to include installed packages to dump or not |
[in] | withIds | Whether print internal package IDs or not |
[in] | The | stream to dump to |
OperationCoreException | SystemException InternalProblemException |
TransactionIterator::Ptr Deepsolver::OperationCore::transaction | ( | AbstractTransactionListener & | listener, |
const UserTask & | task | ||
) |
Transaction here does not imply that client application really wants some changes in OS. This method only initiates the process and allows to understand what changes reflect particular user task, but following process can be interrupted at any stage.
[in] | listener | The reference to an object to following calculation progress |
[in] | task | The desirable changes |
OperationException | TaskException SystemException InternalException |