From e5e3e316687b80d9b5c2ecd49a7093873e5903d4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 7 Jan 2020 12:17:14 +0000 Subject: [PATCH] Fix quoting of %koji. --- Goalfile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Goalfile b/Goalfile index e0c9434..993f087 100644 --- a/Goalfile +++ b/Goalfile @@ -44,6 +44,7 @@ goal all = : source-packages ; # Check if the source package has been built in Koji. tactic *built-in-koji (pkg) = { cd %fedora-dir/%pkg/%branch + koji=%koji specfile=%pkg.spec # Packages which are ignored are treated as if they were rebuilt already. @@ -57,7 +58,7 @@ tactic *built-in-koji (pkg) = { # Else we must check Koji itself. nvr=$(fedpkg verrel) - buildinfo=$(%koji buildinfo $nvr) + buildinfo=$($koji buildinfo $nvr) # No build at all, needs rebuild. echo "$buildinfo" | grep -sq "No such build" && exit 99 @@ -75,7 +76,7 @@ tactic *built-in-koji (pkg) = { exit 1 ;; BUILDING) # Cancel the build, we will resubmit it. - %koji cancel $taskid + $koji cancel $taskid exit 99 ;; CANCELED|DELETED) # Do a rebuild. @@ -88,12 +89,13 @@ tactic *built-in-koji (pkg) = { goal rebuild (pkg) = *built-in-koji ("%pkg") : source-dependencies (pkg) { cd %fedora-dir/%pkg/%branch + koji=%koji specfile=%pkg.spec # We have to wait for the dependencies to become available # before we can start the new build. - for p in $(%koji latest-build %< | awk '{print $1}'); do - %koji --quiet wait-repo side-tag + for p in $($koji latest-build %< | awk '{print $1}'); do + $koji --quiet wait-repo side-tag done # If the specfile doesn't have the magic string then add @@ -105,12 +107,13 @@ goal rebuild (pkg) = fi fedpkg commit -c fedpkg push - if [ %koji = "koji" ]; then + if [ "$koji" = "koji" ]; then fedpkg build else hash=$(git rev-parse HEAD) - %koji build "git+https://src.fedoraproject.org/rpms/"%pkg".git#$hash" %side-tag + $koji build "git+https://src.fedoraproject.org/rpms/"%pkg".git#$hash" %side-tag fi + exit 1 } # Get the source package names for a particular package. -- 1.8.3.1