commit c412100ebd0001c02920a9a31f5ea26f7c94d262 Author: Tomás Touceda chiiph@torproject.org Date: Sat Sep 3 22:54:00 2011 -0300
Try to install only if isReady
Also, it removes a bunch of code for non-thp packages. --- lib/thandy/ClientCLI.py | 23 +++-------------------- 1 files changed, 3 insertions(+), 20 deletions(-)
diff --git a/lib/thandy/ClientCLI.py b/lib/thandy/ClientCLI.py index 828d853..aa60205 100755 --- a/lib/thandy/ClientCLI.py +++ b/lib/thandy/ClientCLI.py @@ -138,33 +138,16 @@ def update(args): 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() - + if thpTransactions and not files: for bundle in thpTransactions: tr = thandy.packagesys.ThpPackages.ThpTransaction(thpTransactions[bundle], alreadyInstalled, repoRoot) if tr.isReady(): logCtrl("READY", BUNDLE=bundle) - if install: + if install and tr.isReady(): tr.install() + logCtrl("INSTALLED", BUNDLE=bundle)
return