summaryrefslogtreecommitdiff
path: root/lib/thandy/packagesys/ThpPackages.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@torproject.org>2011-11-01 13:20:49 -0300
committerTomás Touceda <chiiph@torproject.org>2011-11-01 13:20:49 -0300
commit3e752ddc9435831c5d74181e070ec8c5ba1b714e (patch)
tree48f899e0c6c6d435b614ac7711a9fb1b33911317 /lib/thandy/packagesys/ThpPackages.py
parent87470801fdc396b54bf0f7f8bfe73f05431aa080 (diff)
Make transactions not Thp specific
Diffstat (limited to 'lib/thandy/packagesys/ThpPackages.py')
-rw-r--r--lib/thandy/packagesys/ThpPackages.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/thandy/packagesys/ThpPackages.py b/lib/thandy/packagesys/ThpPackages.py
index b558d59..f82415e 100644
--- a/lib/thandy/packagesys/ThpPackages.py
+++ b/lib/thandy/packagesys/ThpPackages.py
@@ -142,7 +142,7 @@ class ThpChecker(PS.Checker):
# we need to reinstall
return (status == "INSTALLED" and self._version in versions)
-class ThpTransaction(object):
+class ThpTransaction(PS.Transaction):
""" Represents the installation of a bundle that contains thp packages. """
def __init__(self, packages, alreadyInstalled, repoRoot):
self._raw_packages = packages
@@ -254,8 +254,12 @@ class ThpInstaller(PS.Installer):
except:
# Ignore if it already exists
pass
+
+ if "/" in file["name"]:
+ os.makedirs("/".join([destPath] + file["name"].split("/")[:-1]))
+
shutil.copy(os.path.join(self._pkg.getTmpPath(), "content", file['name']),
- os.path.join(destPath, file['name']));
+ os.path.join(destPath, file['name']));
if self._db.isUpgrading():
logging.info("Finishing upgrade.")