From 8311a4e9521bf61b685152762a2cb70bb5125d64 Mon Sep 17 00:00:00 2001 From: Brian Stinson Date: Nov 28 2016 22:21:47 +0000 Subject: build the URL for the sources correctly --- diff --git a/src/centpkg/__init__.py b/src/centpkg/__init__.py index ca27680..b02f98b 100644 --- a/src/centpkg/__init__.py +++ b/src/centpkg/__init__.py @@ -19,6 +19,7 @@ import os import re import sys +import urlparse import warnings from pyrpkg import Commands, rpkgError @@ -230,16 +231,17 @@ class Commands(Commands): if self.lookasidecache.file_is_valid(outfile, csum, self.lookasidehash): continue self.log.info("Downloading %s" % (file)) - url = '%s/%s/%s/%s' % (self.lookaside, self.module_name, + filepath = '%s/%s/%s' % (self.module_name, self.branch_merge, csum, ) + url = urlparse.urljoin(self.lookaside, filepath) command = ['curl', '-H', 'Pragma:', '-o', outfile, '-R', '-S', '--fail'] if self.quiet: command.append('-s') command.append(url) self._run_command(command) - if not self._verify_file(outfile, csum, self.lookasidehash): + if not self.lookasidecache.file_is_valid(outfile, csum, self.lookasidehash): raise rpkgError('%s failed checksum' % file) return