summaryrefslogtreecommitdiffstats
path: root/src/fedpkg.py
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-08-17 16:13:46 -0700
committerJesse Keating <jkeating@redhat.com>2010-08-17 16:13:46 -0700
commitc6c745e8573b8b8df3b9cf673532263608969de1 (patch)
tree8ad491a3a5bbe02b515c4704d352b46d2ce95317 /src/fedpkg.py
parent050360dc31c7cee41a47ca0150ef132919408aba (diff)
downloadfedora-packager-c6c745e8573b8b8df3b9cf673532263608969de1.zip
fedora-packager-c6c745e8573b8b8df3b9cf673532263608969de1.tar.gz
fedora-packager-c6c745e8573b8b8df3b9cf673532263608969de1.tar.xz
Fix up chain building
We were not setting up the chains right, and our logging was all funky. We now handle chains properly and log it sensibly
Diffstat (limited to 'src/fedpkg.py')
-rwxr-xr-xsrc/fedpkg.py23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/fedpkg.py b/src/fedpkg.py
index f5cee54..ae829fa 100755
--- a/src/fedpkg.py
+++ b/src/fedpkg.py
@@ -344,29 +344,38 @@ def chainbuild(args):
if mymodule.module in args.package:
log.error('%s must not be in the chain' % mymodule.module)
sys.exit(1)
+ # make sure we didn't get an empty chain
+ if args.package == [':']:
+ log.error('Must provide at least one dependency build')
+ sys.exit(1)
# Break the chain up into sections
urls = []
build_set = []
log.debug('Processing chain %s' % ' '.join(args.package))
for component in args.package:
if component == ':':
- if build_set:
- # We've hit the end of a set, add the set as a unit to the
- # url list and reset the build_set.
- urls.append(build_set)
- log.debug('Created a build set: %s' % ' '.join(build_set))
- build_set = []
+ # We've hit the end of a set, add the set as a unit to the
+ # url list and reset the build_set.
+ urls.append(build_set)
+ log.debug('Created a build set: %s' % ' '.join(build_set))
+ build_set = []
else:
# Figure out the scm url to build from package name
try:
hash = pyfedpkg.get_latest_commit(component)
url = pyfedpkg.ANONGITURL % {'module':
component} + '#%s' % hash
- build_set.append(url)
except pyfedpkg.FedpkgError, e:
log.error('Could not get a build url for %s: %s'
% (component, e))
sys.exit(1)
+ # If there are no ':' in the chain list, treat each object as an
+ # individual chain
+ if ':' in args.package:
+ build_set.append(url)
+ else:
+ urls.append([url])
+ log.debug('Created a build set: %s' % url)
# Take care of the last build set if we have one
if build_set:
log.debug('Created a build set: %s' % ' '.join(build_set))