summaryrefslogtreecommitdiffstats
path: root/modules/build.py
diff options
context:
space:
mode:
authorYaakov M. Nemoy <loupgaroublond@gmail.com>2009-01-07 11:17:39 -0500
committerYaakov M. Nemoy <loupgaroublond@gmail.com>2009-01-07 11:17:39 -0500
commita7bcebe96bd00388fea1c2cf01e0691534f61744 (patch)
tree570d9309f5e3913d0bbcb2d671284b119e848750 /modules/build.py
parent79577f7d35ba8cff9ba7a1f97d8bae8bab1b001f (diff)
downloadfedora-devshell-a7bcebe96bd00388fea1c2cf01e0691534f61744.tar.gz
fedora-devshell-a7bcebe96bd00388fea1c2cf01e0691534f61744.tar.xz
fedora-devshell-a7bcebe96bd00388fea1c2cf01e0691534f61744.zip
Fixed some bugs in the builder
Diffstat (limited to 'modules/build.py')
-rw-r--r--modules/build.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/modules/build.py b/modules/build.py
index 60f5104..9955512 100644
--- a/modules/build.py
+++ b/modules/build.py
@@ -40,18 +40,18 @@ class Build(Directory):
pkg = DirFactory(package)
with pwd(pkg.dir):
symlink(pkg.spec_file,
- join(self.dir, 'SPECS', pkg.spec_file()))
+ join(self.dir, 'SPECS', pkg.spec_file))
sball = pkg.sourceball
symlink(sball, join(self.dir, 'SOURCES', sball))
patches = [f for f in listdir(getcwd()) if f.endswith('.patch')]
for patch in patches:
symlink(patch, join(self.dir, 'SOURCES', patch))
- def build_quick_rpm(self):
- self.rpmbuild('-ba')
+ def build_quick_rpm(self, package):
+ self.rpmbuild('-ba', package)
- def build_source_rpm(self):
- self.rpmbuild('-bs')
+ def build_source_rpm(self, package):
+ self.rpmbuild('-bs', package)
def rpmbuild(self, param, package, profile=None):
pkg = DirFactory(package)
@@ -60,16 +60,18 @@ class Build(Directory):
dir_defines(self.dir))
else:
defines = dir_defines(self.dir)
+ log.debug('defines are ' + str(defines))
+ log.debug('spec file is ' + pkg.spec_file)
+ cmd = ['rpmbuild'] + defines + ['-v', param, pkg.spec_file]
+ log.debug('cmd is ' + str(cmd))
with pwd(pkg.dir):
with log_file('rpmbuild.log') as rpm_out:
with pwd(join(self.dir, 'SPECS')):
- p = Popen(['rpmbuild',
- defines, param,
- pkg.spec_file],
- stdout=rpm_out, stderr=rpm_out)
+ p = Popen(cmd, stdout=rpm_out, stderr=rpm_out)
log.info('building %s... please wait'
% pkg.spec_file)
p.wait()
+ log.debug(p.returncode)
def fetch_rpms(self):
with pwd(self.dir):