NoTgzBuilder - do not guess source, get it correctly from spec file

This commit is contained in:
Miroslav Suchý 2013-01-17 16:18:05 +01:00
parent 7ca6d78090
commit 9feb9cf48d
2 changed files with 4 additions and 6 deletions

View file

@ -474,13 +474,10 @@ class NoTgzBuilder(Builder):
self._setup_sources()
self.ran_tgz = True
source_suffixes = ('.tar.gz', '.tgz', '.tar.bz2', '.tar', '.zip', '.jar', '.gem')
debug("Scanning for sources.")
for filename in os.listdir(self.rpmbuild_gitcopy):
for suffix in source_suffixes:
if filename.endswith(suffix):
self.sources.append(os.path.join(self.rpmbuild_gitcopy,
filename))
cmd = "/usr/bin/spectool --list-files '%s' | awk '{print $2}' |xargs -l1 basename " % self.spec_file
result = run_command(cmd)
self.sources = map(lambda x: os.path.join(self.rpmbuild_gitcopy, x), result.split("\n"))
debug(" Sources: %s" % self.sources)
def _get_rpmbuild_dir_options(self):

View file

@ -24,6 +24,7 @@ Requires: GitPython >= 0.2.0
Requires: fedpkg
Requires: fedora-cert
Requires: fedora-packager
Requires: rpmdevtools
%description
Tito is a tool for managing tarballs, rpms, and builds for projects using