From b046b944a21f07f64319ec1c28ab747c0179a850 Mon Sep 17 00:00:00 2001 From: Brian Stinson Date: Sep 09 2021 20:38:57 +0000 Subject: [PATCH 1/2] Download filenames with the '.rpm' extension Signed-off-by: Brian Stinson --- diff --git a/calligrabot/utils.py b/calligrabot/utils.py index 9a8803f..28d8182 100644 --- a/calligrabot/utils.py +++ b/calligrabot/utils.py @@ -92,6 +92,9 @@ def download_build_rpm(koji_profile, rpm, path): """ log.debug("Downloading {} from koji".format(rpm)) + # Robosignatory hands us a list of packages in this format: name-version-release.dist.arch + # We need to make sure that we include the '.rpm' extension when we try to download from koji + rpmbasename = rpm + '.rpm' koji_cmd = _build_koji_cmd(koji_profile) koji_cmd.extend( [ @@ -99,12 +102,12 @@ def download_build_rpm(koji_profile, rpm, path): "--rpm", "--debuginfo", "--noprogress", - rpm, + rpmbasename, ] ) _, stdout, _ = run_command(koji_cmd, cwd=path) - rpmfile = os.path.join(path, rpm) + rpmfile = os.path.join(path, rpmbasename) if not os.path.isfile(rpmfile): raise Exception("Downloaded RPM file {} is missing.".format(rpmfile)) From b814e2acc011f4d91a1e9a2b3b38d62d2f267a74 Mon Sep 17 00:00:00 2001 From: Brian Stinson Date: Sep 09 2021 21:28:55 +0000 Subject: [PATCH 2/2] update docstring Signed-off-by: Brian Stinson --- diff --git a/calligrabot/utils.py b/calligrabot/utils.py index 28d8182..0efd8a8 100644 --- a/calligrabot/utils.py +++ b/calligrabot/utils.py @@ -86,7 +86,7 @@ def download_build_rpm(koji_profile, rpm, path): Download one rpm from koji. :param koji_profile: Properties describing configured koji instance. - :param rpm: Full name-version-release.arch.rpm RPM name. + :param rpm: name-version-release.arch RPM name (without file extension). :param path: Directory path to which the RPM file should be downloaded. :returns: Full path to the downloaded RPM. """