diff enterprise/kdei18n.py @ 45:3e610233ccfe

use cmdexpand when calling subprocesses
author Bernhard Herzog <bh@intevation.de>
date Tue, 20 Mar 2007 17:27:46 +0100
parents f7f89548a2a6
children 6b5f7f7575f6
line wrap: on
line diff
--- a/enterprise/kdei18n.py	Mon Mar 19 20:14:07 2007 +0100
+++ b/enterprise/kdei18n.py	Tue Mar 20 17:27:46 2007 +0100
@@ -13,6 +13,7 @@
 import treepkg.packager
 import treepkg.util
 import treepkg.run as run
+from treepkg.cmdexpand import cmdexpand
 
 
 class SourcePackager(treepkg.packager.SourcePackager):
@@ -50,7 +51,8 @@
 
     def unpack_orig_tarball(self):
         orig_tarball = self.pkg_line.orig_tarball
-        run.call(["tar", "xjf", orig_tarball, "-C", self.work_dir])
+        run.call(cmdexpand("tar xjf $tarball -C $directory",
+                           tarball=orig_tarball, directory=self.work_dir))
         tarbasename = os.path.basename(orig_tarball)
         splitext = os.path.splitext
         return os.path.join(self.work_dir,
@@ -71,7 +73,7 @@
         treepkg.util.copytree(untarred_dir, de_dir)
         treepkg.util.copytree(new_de_dir, de_dir)
         logging.info("Running scripts/autogen.sh for kde-i18n-de tarball")
-        run.call(["/bin/sh", "scripts/autogen.sh", "de"], cwd=pkgbasedir,
+        run.call(cmdexpand("/bin/sh scripts/autogen.sh de"), cwd=pkgbasedir,
                  suppress_output=True)
 
         tarballdir = "kde-i18n-de-" + pkgbaseversion
@@ -79,7 +81,8 @@
 
         tarball = os.path.join(os.path.dirname(pkgbasedir),
                                tarballdir + ".tar.bz2")
-        run.call(["tar", "cjf", tarball, "-C", pkgbasedir, tarballdir])
+        run.call(cmdexpand("tar cjf $tarball -C $pkgbasedir $tarballdir",
+                           **locals()))
         logging.info("Created kde-i18n-de tarball")
         return tarball
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)