Refactor reusable pkgman code into libpackage
* Move RepositoryBuilder class to libpackage and add B* prefix to name. * Pull BPackageManager class out of PackageManager and move to libpackage. The base class is customizable via three handler objects responsible for transaction handling, request execution, respectively user interaction. * Reorganize _ApplyPackageChanges(): Now we first prepare the transactions for all affected installation locations (downloading files etc.) and then commit them.
This commit is contained in:
@@ -89,10 +89,7 @@ UpdateCommand::Execute(int argc, const char* const* argv)
|
||||
const char* const* packages = argv + optind;
|
||||
|
||||
// perform the update
|
||||
PackageManager packageManager(location,
|
||||
PackageManager::ADD_INSTALLED_REPOSITORIES
|
||||
| PackageManager::ADD_REMOTE_REPOSITORIES
|
||||
| PackageManager::REFRESH_REPOSITORIES);
|
||||
PackageManager packageManager(location);
|
||||
packageManager.Update(packages, packageCount);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user