if [ %pkg = "$p" ]; then exit 0; fi
done
- # If the specfile doesn't have the magic string then the
- # package definitely needs to be rebuilt.
- grep -sq %fedora-rebuild-name $specfile || exit 99
+ if ! grep -sq "^%%autochangelog" $specfile; then
+ # If the specfile doesn't have the magic string then the
+ # package definitely needs to be rebuilt.
+ grep -sq %fedora-rebuild-name $specfile || exit 99
+ else
+ # Using autochangelog.
+ git log | grep -sq %fedora-rebuild-name || exit 99
+ fi
# Else we must check Koji itself.
# Koji sends some messages to stderr.