summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorYaakov M. Nemoy <loupgaroublond@gmail.com>2009-01-18 22:29:35 -0500
committerYaakov M. Nemoy <loupgaroublond@gmail.com>2009-01-18 22:29:35 -0500
commit1a1c0bb68241619fc01c971d972c3dea330b35c0 (patch)
tree462db633e13fd9db4e685e07043b6cdfe02bd433 /modules
parentd3d01a3237b1767f61953e34879dffd16667b769 (diff)
downloadfedora-devshell-1a1c0bb68241619fc01c971d972c3dea330b35c0.tar.gz
fedora-devshell-1a1c0bb68241619fc01c971d972c3dea330b35c0.tar.xz
fedora-devshell-1a1c0bb68241619fc01c971d972c3dea330b35c0.zip
One Liner bug fixes
Diffstat (limited to 'modules')
-rw-r--r--modules/buildsystem.py5
-rw-r--r--modules/cabal.py3
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/buildsystem.py b/modules/buildsystem.py
index 5265101..1e0bd2d 100644
--- a/modules/buildsystem.py
+++ b/modules/buildsystem.py
@@ -16,6 +16,9 @@
# Authors: Yaakov M. Nemoy <ynemoy@redhat.com>
#
+import base.factories as factories
+
+from base.factories import DirFactory
from base.module import Module
class MetaBuildSystem(type):
@@ -27,7 +30,7 @@ class MetaBuildSystem(type):
class BuildSystem(Module):
__metaclass__ = MetaBuildSystem
def __init__(self, name):
- if type(name) is string:
+ if type(name) is str:
self.pkg_src = DirFactory(name)
self.name = name
else:
diff --git a/modules/cabal.py b/modules/cabal.py
index fc9bc4f..696e120 100644
--- a/modules/cabal.py
+++ b/modules/cabal.py
@@ -134,11 +134,12 @@ class Cabal(BuildSystem):
self.install(orig)
def gen_spec(self):
- cabal_file = self.pkg_src.hackage_name + '.spec'
+ cabal_file = self.pkg_src.hackage_name + '.cabal'
with pwd(self.pkg_src.pkg_src_dir):
with log_file('cabal2spec.log') as c2s_log:
with pwd(self.pkg_src.dir):
cmd = ['cabal2spec', cabal_file]
+ log.debug(str(cmd))
p = Popen(cmd, stdout=c2s_log, stderr=c2s_log)
log.info('Generating spec file for %s' % cabal_file)
p.communicate()