performs system modifications
More...
#include <cupt/system/worker.hpp>
performs system modifications
◆ Worker()
cupt::system::Worker::Worker |
( |
const shared_ptr< const Config > & |
config, |
|
|
const shared_ptr< const Cache > & |
cache |
|
) |
| |
◆ changeSystem()
void cupt::system::Worker::changeSystem |
( |
const shared_ptr< download::Progress > & |
progress | ) |
|
Modifies the system to achieve the desired state set by setDesiredState.
- Parameters
-
◆ deleteArchive()
void cupt::system::Worker::deleteArchive |
( |
const string & |
path | ) |
|
Deletes an archive file (it may be a symlink). Verifies that deleted file is located under archives path directory.
- Parameters
-
path | absolute (i.e., not relative) path to file |
◆ deletePartialArchives()
void cupt::system::Worker::deletePartialArchives |
( |
| ) |
|
Deletes all partially downloaded archive files.
◆ getActionsPreview()
shared_ptr< const ActionsPreview > cupt::system::Worker::getActionsPreview |
( |
| ) |
const |
Shouldn't be called before setDesiredState.
- Returns
- a set of actions to get the desired system state divided by action types
◆ getArchivesInfo()
vector< pair< string, const BinaryVersion* > > cupt::system::Worker::getArchivesInfo |
( |
| ) |
const |
gets available archives of binary versions
Gets paths of all '.deb' archives in the archives directory and matches them to available binary versions. Not matched paths with be paired with an empty pointer.
- Returns
- array of pairs < package name, pointer to binary version >
◆ getDownloadSizesPreview()
pair< size_t, size_t > cupt::system::Worker::getDownloadSizesPreview |
( |
| ) |
const |
Shouldn't be called before setDesiredState.
- Returns
- pair: total amount of needed binary archives (in bytes), amount to download (in bytes)
◆ getUnpackedSizesPreview()
map< string, ssize_t > cupt::system::Worker::getUnpackedSizesPreview |
( |
| ) |
const |
Shouldn't be called before setDesiredState.
- Returns
- map: package name -> unpacked size change (in bytes)
◆ removeSnapshot()
void cupt::system::Worker::removeSnapshot |
( |
const Snapshots & |
, |
|
|
const string & |
name |
|
) |
| |
Removes a system snapshot.
- Parameters
-
◆ renameSnapshot()
void cupt::system::Worker::renameSnapshot |
( |
const Snapshots & |
, |
|
|
const string & |
previousName, |
|
|
const string & |
newName |
|
) |
| |
Renames a system snapshot.
- Parameters
-
previousName | previous snasphot name |
newName | new snapshot name |
◆ saveSnapshot()
void cupt::system::Worker::saveSnapshot |
( |
const Snapshots & |
, |
|
|
const string & |
name |
|
) |
| |
Makes a system snapshot with a name name.
- Parameters
-
◆ setDesiredState()
void cupt::system::Worker::setDesiredState |
( |
const Resolver::Offer & |
offer | ) |
|
Sets the desired system state.
May be called several times for examining different possible system states.
- Parameters
-
◆ setPackagePurgeFlag()
void cupt::system::Worker::setPackagePurgeFlag |
( |
const string & |
packageName, |
|
|
bool |
value |
|
) |
| |
Sets the purge flag for removed packages.
Removed packages can be either simply removed or removed along with their configuration files (purged).
Changes which are made by this method are not visible until you call setDesiredState. If some calls of this method were made after a last call to setDesiredState, you must call setDesiredState again.
- Parameters
-
packageName | binary package name to modify a flag value for |
value | the target state of the flag |
◆ updateReleaseAndIndexData()
void cupt::system::Worker::updateReleaseAndIndexData |
( |
const shared_ptr< download::Progress > & |
progress | ) |
|
Downloads latest Release and Packages/Sources files from repository sources.
- Parameters
-
The documentation for this class was generated from the following file: