From 9feb9cf48d0e24a74fefed8c41f8b2476882bac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Thu, 17 Jan 2013 16:18:05 +0100 Subject: [PATCH] NoTgzBuilder - do not guess source, get it correctly from spec file --- src/tito/builder.py | 9 +++------ tito.spec | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/tito/builder.py b/src/tito/builder.py index caf34b0..bbd75e8 100644 --- a/src/tito/builder.py +++ b/src/tito/builder.py @@ -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): diff --git a/tito.spec b/tito.spec index 8e7b335..065b496 100644 --- a/tito.spec +++ b/tito.spec @@ -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