cd %fedora-dir/%pkg/%branch
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
+ done
+
# If the specfile doesn't have the magic string then add
# that now.
if ! grep -sq %rebuild-name $specfile; then