diff --git a/aurweb/git/update.py b/aurweb/git/update.py index dbc0dd9a..51d5c591 100755 --- a/aurweb/git/update.py +++ b/aurweb/git/update.py @@ -399,7 +399,7 @@ def main(): # noqa: C901 ) script = srcinfo.get_variable(script_name)[0] - if script not in commit.tree: + if os.path.normpath(script) not in commit.tree: die_commit(f"Missing {script_name} file {script}.", str(commit.id)) # Check sources. diff --git a/test/test_git.py b/test/test_git.py index c9d20f2d..85bd00b2 100644 --- a/test/test_git.py +++ b/test/test_git.py @@ -144,10 +144,13 @@ def test_basic_push(): f"source_amd64 = {source_url_prefix}/source6", f"focal_source_amd64 = {source_url_prefix}/source7", f"focal_source_amd64 = {source_url_prefix}/source8", + "postinst = ./testfile", ], ) - repo.add(["PKGBUILD", ".SRCINFO"]) + write_file("testfile", []) + + repo.add(["PKGBUILD", ".SRCINFO", "testfile"]) repo.commit() repo.push()