Skip to content

fix(aur): first publish of a new package pushed nothing, and reported success#46

Merged
vietanhdev merged 1 commit into
mainfrom
fix/aur-first-publish
Jul 20, 2026
Merged

fix(aur): first publish of a new package pushed nothing, and reported success#46
vietanhdev merged 1 commit into
mainfrom
fix/aur-first-publish

Conversation

@vietanhdev

Copy link
Copy Markdown
Owner

The v0.2.0 AUR publish reported success and produced a 404 package.

warning: You appear to have cloned an empty repository.
No change to publish.

Cause

The AUR repo for a never-published package is empty, so the copied PKGBUILD and .SRCINFO are untracked. git diff --quiet compares tracked files only — it saw nothing, printed "No change to publish", and exited 0. The workflow went green having pushed nothing.

This would silently skip the first publish of any new AUR package. It only looks correct on updates, where the files already exist as tracked.

Reproduced, not reasoned about

Against a real empty bare repo with both files present:

OLD: git diff --quiet before staging   -> "No change to publish"  (wrong)
NEW: stage, then git status --porcelain -> would commit           (correct)

git status --porcelain counts untracked and staged entries, and works in a repo with no HEAD to diff against.

Also: verify the push landed

A push that resolves to a no-op exits 0. This workflow has now demonstrated once that "reported success, published nothing" is a state it can reach, so the exit code alone isn't evidence. It now compares HEAD against git ls-remote and fails loudly if the remote didn't move.

Wider point

Three bugs in this workflow have now shared one shape: a step that succeeds while accomplishing nothing — ssh-keyscan returning no keys and exiting 0, git diff not seeing untracked files, and git push no-oping. Each reported success. The external check (curl the AUR RPC) is what caught it, not CI.

…cess

The v0.2.0 AUR publish reported success and produced a 404 package.

  warning: You appear to have cloned an empty repository.
  No change to publish.

The AUR repo for a package that has never been published is empty, so the
copied PKGBUILD and .SRCINFO are UNTRACKED. `git diff --quiet` compares
tracked files only, saw nothing, printed "No change to publish" and
exited 0 -- so the workflow went green having pushed nothing at all. It
would silently skip the first publish of ANY new AUR package.

Stages first, then tests with git status --porcelain, which counts
untracked and staged entries and works in a repo with no HEAD to diff
against. Reproduced against a real empty repo before and after: the old
form reports no change with both files present, the new one commits.

Also verifies the push actually landed by comparing HEAD against
ls-remote. A push that resolves to a no-op exits 0, and this workflow has
now demonstrated once that reporting success while publishing nothing is
a state it can reach -- so exit codes alone are not sufficient evidence
that a package is live.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 20, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
thinkutils db88774 Jul 20 2026, 07:34 AM

@vietanhdev
vietanhdev merged commit be8622f into main Jul 20, 2026
11 of 12 checks passed
@vietanhdev
vietanhdev deleted the fix/aur-first-publish branch July 20, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant