summaryrefslogtreecommitdiff
path: root/lib/thandy/ClientCLI.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@torproject.org>2011-09-03 21:58:47 -0300
committerTomás Touceda <chiiph@torproject.org>2011-09-03 21:58:47 -0300
commit7d87a55747e82c7b23daa48581135c35b553aeaf (patch)
tree18e44364fea284cc9cce86299272f143d0e952ba /lib/thandy/ClientCLI.py
parentf04c3429dc33c9bcadfe8a3707f8646690838db8 (diff)
Improve re-install behavior
Also add more controller oriented output
Diffstat (limited to 'lib/thandy/ClientCLI.py')
-rwxr-xr-xlib/thandy/ClientCLI.py41
1 files changed, 23 insertions, 18 deletions
diff --git a/lib/thandy/ClientCLI.py b/lib/thandy/ClientCLI.py
index 2987918..f568a2c 100755
--- a/lib/thandy/ClientCLI.py
+++ b/lib/thandy/ClientCLI.py
@@ -122,6 +122,7 @@ def update(args):
installable = {}
btMetadata = {}
thpTransactions = {}
+ alreadyInstalled = set()
logging.info("Checking for files to update.")
files, downloadingFiles = repo.getFilesToUpdate(
trackingBundles=args,
@@ -130,34 +131,38 @@ def update(args):
usePackageSystem=use_packagesys,
installableDict=installable,
btMetadataDict=btMetadata,
- thpTransactionDict=thpTransactions)
+ thpTransactionDict=thpTransactions,
+ alreadyInstalledSet=alreadyInstalled)
if forceCheck:
files.add("/meta/timestamp.txt")
forceCheck = False
if (thpTransactions or installable) and not files:
- for p, d in installable.items():
- for n, i in d.items():
- if i.canInstall():
- logCtrl("CAN_INSTALL", PKG=p, ITEM=n)
- else:
- logCtrl("NO_INSTALL", PKG=p, ITEM=n)
- i.setCacheRoot(repoRoot)
-
- logging.info("Ready to install packages for files: %s",
- ", ".join(sorted(installable.keys())))
- if install:
- # XXXX handle ordering
- for p in installable.values():
- for h in p.values():
- i = h.getInstaller()
- if i != None:
- i.install()
+ # for p, d in installable.items():
+ # for n, i in d.items():
+ # if i.canInstall():
+ # logCtrl("CAN_INSTALL", PKG=p, ITEM=n)
+ # else:
+ # logCtrl("NO_INSTALL", PKG=p, ITEM=n)
+ # i.setCacheRoot(repoRoot)
+
+ # logging.info("Ready to install packages for files: %s",
+ # ", ".join(sorted(installable.keys())))
+ # if install:
+ # # XXXX handle ordering
+ # for p in installable.values():
+ # for h in p.values():
+ # i = h.getInstaller()
+ # if i != None:
+ # i.install()
+
+ logCtrl("READY", BUNDLE=",".join(thpTransactions.keys()))
for bundle in thpTransactions:
if install:
thandy.packagesys.ThpPackages.ThpTransaction(thpTransactions[bundle],
+ alreadyInstalled,
repoRoot).install()
return