change: only require .SRCINFO in the latest revision

This is done in order to relax the constraints so that dropping packages
from the official repos can be done with preserving their history.

Its sufficient to also have this present in the latest commit of a push.

Signed-off-by: Christian Heusel <christian@heusel.eu>
This commit is contained in:
Christian Heusel 2023-06-02 16:19:44 +02:00
parent ed2f85ad04
commit e9cc2fb437
No known key found for this signature in database
GPG key ID: C047D4F328B52585
2 changed files with 80 additions and 87 deletions

View file

@ -175,10 +175,8 @@ test_expect_success 'Removing .SRCINFO with a follow-up fix.' '
git -C aur.git commit -q -m "Remove .SRCINFO" &&
git -C aur.git revert --no-edit HEAD &&
new=$(git -C aur.git rev-parse HEAD) &&
test_must_fail \
env AUR_USER=user AUR_PKGBASE=foobar AUR_PRIVILEGED=0 \
cover "$GIT_UPDATE" refs/heads/master "$old" "$new" >actual 2>&1 &&
grep -q "^error: missing .SRCINFO$" actual
cover "$GIT_UPDATE" refs/heads/master "$old" "$new" 2>&1
'
test_expect_success 'Removing PKGBUILD.' '