diff options
author | Tomás Touceda <chiiph@torproject.org> | 2011-11-01 13:20:49 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@torproject.org> | 2011-11-01 13:20:49 -0300 |
commit | 3e752ddc9435831c5d74181e070ec8c5ba1b714e (patch) | |
tree | 48f899e0c6c6d435b614ac7711a9fb1b33911317 /lib/thandy/ClientCLI.py | |
parent | 87470801fdc396b54bf0f7f8bfe73f05431aa080 (diff) |
Make transactions not Thp specific
Diffstat (limited to 'lib/thandy/ClientCLI.py')
-rw-r--r-- | lib/thandy/ClientCLI.py | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/thandy/ClientCLI.py b/lib/thandy/ClientCLI.py index f3192f9..d3bcaf0 100644 --- a/lib/thandy/ClientCLI.py +++ b/lib/thandy/ClientCLI.py @@ -15,7 +15,6 @@ import thandy.repository import thandy.download import thandy.master_keys import thandy.packagesys.PackageSystem -import thandy.packagesys.ThpPackages import thandy.socksurls import thandy.encodeToXML @@ -121,7 +120,6 @@ def update(args): lengths = {} installable = {} btMetadata = {} - thpTransactions = {} alreadyInstalled = set() logging.info("Checking for files to update.") files, downloadingFiles = repo.getFilesToUpdate( @@ -131,23 +129,24 @@ def update(args): usePackageSystem=use_packagesys, installableDict=installable, btMetadataDict=btMetadata, - thpTransactionDict=thpTransactions, - alreadyInstalledSet=alreadyInstalled) + alreadyInstalledSet=alreadyInstalled, + cacheRoot=repoRoot) if forceCheck: files.add("/meta/timestamp.txt") forceCheck = False - if thpTransactions and not files: - for bundle in thpTransactions: - tr = thandy.packagesys.ThpPackages.ThpTransaction(thpTransactions[bundle], - alreadyInstalled, - repoRoot) - if tr.isReady(): + if installable and not files: + for bundle, transaction in installable.items(): + if transaction.isReady(): logCtrl("READY", BUNDLE=bundle) - if install and tr.isReady(): - tr.install() - logCtrl("INSTALLED", BUNDLE=bundle) + logging.info("Ready to install packages for files: %s", + ", ".join(sorted(installable.keys()))) + + if install: + for p in installable.values(): + if p.isReady(): + p.install() return |