summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorYaakov M. Nemoy <loupgaroublond@gmail.com>2009-01-16 21:26:10 -0500
committerYaakov M. Nemoy <loupgaroublond@gmail.com>2009-01-16 21:26:10 -0500
commitc5b381c3af851468406f8ee71cbf24b5f11becdf (patch)
tree4d6dfaa19f2addae77c78990013a24e3fb8ed9b9 /modules
parent2033632cb3fc1ed5d9d16be5552ac941033beb66 (diff)
downloadfedora-devshell-c5b381c3af851468406f8ee71cbf24b5f11becdf.tar.gz
fedora-devshell-c5b381c3af851468406f8ee71cbf24b5f11becdf.tar.xz
fedora-devshell-c5b381c3af851468406f8ee71cbf24b5f11becdf.zip
Small bugfixes
Diffstat (limited to 'modules')
-rw-r--r--modules/sourceball.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/sourceball.py b/modules/sourceball.py
index 38abf1f..17d6def 100644
--- a/modules/sourceball.py
+++ b/modules/sourceball.py
@@ -28,7 +28,7 @@ from tempfile import mkdtemp
from base.base import log
from base.dirfactory import DirFactory
from base.exceptions import ExecutionException
-from base.util import pwd, copy, move
+from base.util import pwd, copy, move, base_dir
from modules.packagesource import PackageSource
@@ -39,16 +39,17 @@ class SourceBall(PackageSource):
tmp_dir = mkdtemp()
with pwd(tmp_dir):
sourceball_name = copy(tarball, split(tarball)[1])
+ log.debug('sourceball_name ' + sourceball_name)
sourceball = tarfile.open(sourceball_name)
- extract_dir = min([(x.name, x) for x in sourceball])[0]
- extract_dir = basename(abspath(extract_dir))
+ extract_dir = base_dir(sourceball)
if name and not name == extract_dir:
+ log.debug('hahahahhaah')
raise ExecutionException("tarball is not target directory")
if not name:
name = extract_dir
super(SourceBall, self).__init__(name)
if tarball:
- with pwd(self.dir):
+ with pwd(self.parent):
sourceball.extractall()
with pwd(self.branch_dir):
sourceball.extractall()