From 245d58049c1657ec5116b0e3598c83a82d11a69a Mon Sep 17 00:00:00 2001 From: Tomas Touceda Date: Thu, 23 Jun 2011 20:10:16 -0300 Subject: Adds the code to introduce Thp Transactions Recognizes bundles that have all thp packages and arranges them in a separated dict from the installableDict. This bundles will be handled by the ThpInstaller as a whole, so it can order installations by dependencies. --- lib/thandy/ClientCLI.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/thandy/ClientCLI.py') diff --git a/lib/thandy/ClientCLI.py b/lib/thandy/ClientCLI.py index bcbdfc7..97951b4 100644 --- a/lib/thandy/ClientCLI.py +++ b/lib/thandy/ClientCLI.py @@ -120,6 +120,7 @@ def update(args): lengths = {} installable = {} btMetadata = {} + thpTransactions = {} logging.info("Checking for files to update.") files, downloadingFiles = repo.getFilesToUpdate( trackingBundles=args, @@ -127,13 +128,14 @@ def update(args): lengthDict=lengths, usePackageSystem=use_packagesys, installableDict=installable, - btMetadataDict=btMetadata) + btMetadataDict=btMetadata + thpTransactionDict=thpTransactions) if forceCheck: files.add("/meta/timestamp.txt") forceCheck = False - if installable and not files: + if (thpTransactions or installable) and not files: for p, d in installable.items(): for n, i in d.items(): if i.canInstall(): @@ -151,6 +153,12 @@ def update(args): i = h.getInstaller() if i != None: i.install() + + print "Bundles with all THP packages:" + for bundle in thpTransactions: + # TODO: ThpTransaction goes here! + print bundle + return elif not files: -- cgit v1.2.3