From: Richard W.M. Jones Date: Tue, 24 Jan 2023 15:36:33 +0000 (+0000) Subject: stdlib: Fix detection of already build package when rpmautospec X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=a859ccb1809e6514a9e0119f1cb6be2862237680;p=goals.git stdlib: Fix detection of already build package when rpmautospec Fixes: commit dc1c16833922b20e6949058a3813a595bb89194b --- diff --git a/stdlib/fedora.gl b/stdlib/fedora.gl index 5dca4d9..ef515c6 100644 --- a/stdlib/fedora.gl +++ b/stdlib/fedora.gl @@ -56,9 +56,14 @@ predicate is-koji-built (pkg) = { 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.