commit 40b3a86a82054c88f5865cef9b8d7fff8486f768 Author: Tomás Touceda chiiph@torproject.org Date: Fri Sep 2 19:26:42 2011 -0300
Run transactions only if --install is given, and create pkg-status if it doesn't exist --- lib/thandy/ClientCLI.py | 5 +++-- lib/thandy/packagesys/ThpPackages.py | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/thandy/ClientCLI.py b/lib/thandy/ClientCLI.py index 75aa347..2987918 100755 --- a/lib/thandy/ClientCLI.py +++ b/lib/thandy/ClientCLI.py @@ -156,8 +156,9 @@ def update(args): i.install()
for bundle in thpTransactions: - thandy.packagesys.ThpPackages.ThpTransaction(thpTransactions[bundle], - repoRoot).install() + if install: + thandy.packagesys.ThpPackages.ThpTransaction(thpTransactions[bundle], + repoRoot).install()
return
diff --git a/lib/thandy/packagesys/ThpPackages.py b/lib/thandy/packagesys/ThpPackages.py index 090fe55..f359957 100755 --- a/lib/thandy/packagesys/ThpPackages.py +++ b/lib/thandy/packagesys/ThpPackages.py @@ -24,6 +24,9 @@ class ThpDB(object): self._thp_db_root = os.environ.get("THP_DB_ROOT") if self._thp_db_root is None: raise Exception("There is no THP_DB_ROOT variable set") + dbpath = os.path.join(self._thp_db_root, "pkg-status") + if not os.path.exists(dbpath): + os.mkdir(dbpat)
def getPath(self): return self._thp_db_root