# 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.
# 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
exit 1 ;;
BUILDING)
# Cancel the build, we will resubmit it.
- %koji cancel $taskid
+ $koji cancel $taskid
exit 99 ;;
CANCELED|DELETED)
# Do a rebuild.
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
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.