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:
Ingo Weinhold
2013-08-31 21:19:07 +02:00
parent a0cb235c0e
commit 83462cc28d
25 changed files with 1646 additions and 998 deletions
+1 -4
View File
@@ -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;