Skip to content

tools/pkg-version: count package versions from main's history - #690

Open
robotosaith wants to merge 22 commits into
derekross:mainfrom
robotosaith:pkg-version-from-git
Open

robotosaith wants to merge 22 commits into
derekross:mainfrom
robotosaith:pkg-version-from-git

Conversation

@robotosaith

@robotosaith robotosaith commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Fixes #689. Package versions are no longer written in pull requests. tools/pkg-version keeps the series from each version file (its first two numbers, such as 0.2) and counts the commits on main that touched the package, starting from the number the file holds today, so no published version comes back and two merges can't ship one number. A branch builds as <main's version>.<n>.g<commit> and uncommitted edits as .d<tree>, which pacman orders between main's builds; tools/repo-publish refuses both. A third number in version still works as a floor, so contributors can keep their old habit for a while.

The switch. Nothing is renumbered by hand. Until this merges, the version files are the published versions. A commit counts when the package's own PKGBUILD reads .pkgver, so the start is each package's opt-in, not the tool's path (moving the tool is one more number, never a restart). The merge commit makes 29 PKGBUILDs opt in, so each of those packages moves one number up and the next nightly republishes them once. Open pull requests that still bump merge as they are: a number at or below the count changes nothing, and one above it is taken as a floor (drop that hunk unless you want the jump). The old third numbers stay in the files while people adjust; cutting them to 0.2 later is your call. Going back would mean writing the counted versions into the files first. RELEASES §7.1 has the details; CONTRIBUTING §6.3 and AGENTS are updated, commit subjects no longer carry a version, and the packages built from another project's release, the kernel, the keyring and omamobile-device-cheetah keep hand-written versions. device-cheetah ships the boot files release phones write to slot B, so its version stays yours to write after they have booted on the 7 Pro; tests/pkg-version fails if a package with OMAMOBILE_BOOT_FILES is ever counted. The reviewer agent and the review lessons are left for you.

Builds without git history (the container, the phone) get the version as .pkgver from tools/build-packages, repo-build and phone-install-package. The installed /usr/share/omamobile/*/version files hold the real version.

Device and build

  • Phone: none: tools and packaging only
  • Kernel release (uname -r): n/a
  • Packages changed, with versions: 29 PKGBUILDs that read version now read the counted version (omamobile-device-cheetah keeps reading version); no version file changed

Checks (no phone needed)

  • tools/pr-check origin/main passes
  • tests/all passes; tests/pkg-version replays this repository's history from its first commit (29 packages, 420 commits: every commit a new number, none below its file's)
  • tests/packages: every package's test/all gives the same results in a standalone copy as on main
  • No package version bumped
  • Commits have area prefixes and bodies that say why; AI help is a Co-Authored-By: trailer

On the phone

  • I ran this on my own phone, booted into this build
  • What I did not test: installing the packages on a phone. makepkg was run from a copy in an Arch Linux container, and pacman's order was checked with vercmp
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)

🤖 Generated with Claude Code

robotosaith and others added 10 commits November 12, 2026 08:27
Every PR bumped its packages' version files, and open PRs kept taking
the same number: two branches that write the same version line merge
without a conflict, so the second shipped new contents under a published
number unless a review caught it (review lessons L-12, L-404, L-426,
L-477), and the fixes were renumber commits, "main merged" commits on
contributors' branches, or a follow-up PR (derekross#683).

tools/pkg-version works the version out instead. The version file gives
the series (its first two numbers); on main's first-parent line every
commit that touches packages/<name> is the next number. The count
starts at the commit that adds this tool, from the version file as it
stood then, so no published number comes back, and a third number in
the file is read as a floor only, so an old-style bump changes nothing
(an equal or lower one) or lifts the count (a higher one). A build off
main is main's version at the merge base plus the branch's commits and
the commit (0.2.130.1.g4f2a9c1), which pacman orders between main's
0.2.130 and 0.2.131; a package or series main doesn't have yet builds as
0.1.0pre1.g<commit>, below main's first 0.1.0. --commit maps a version
back to the commit it was built from (derekross#689).

The build container and the phone get no .git, so build-packages,
repo-build and phone-install-package copy a package through
tools/lib/pkg-tar.sh, which adds the version as .pkgver; without the
history (a shallow clone, a copy) it refuses rather than guess. CI's
test job checks out the full history for the count.

tests/pkg-version covers the cases in a scratch repository (two PRs
that both wrote one number land as two, a merge commit counts once,
branch builds, the refusals; pacman's order with vercmp where pacman
is) and replays this repository's history as if the count had started
at its first commit: 30 packages over 382 commits, every commit a new
number and none below its version file's. The same replay shows what
the old scheme did: 61 times a package changed on main without a new
number, 12 of them in files the package ships.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 30 packages whose PKGBUILD read pkgver from their version file read
it from .pkgver when a build tool made a copy, and from
tools/pkg-version otherwise. omamobile-keyring (a date the index names)
and linux-omamobile (pkgrel only) keep their own schemes; the upstream
builds keep their pinned versions.

omamobile-remote printed a version written into its script, which had
to match the version file by hand (L-640); install now writes the
package's pkgver into it. omamobile-voice's test compares pkgver with
tools/pkg-version instead of the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Subjects drop the version, the PR template asks for no bump, and
CONTRIBUTING §6.3 says how versions come about now: the series in the
version file, one number per commit on main, a branch build's suffix,
and that a dependency on a change not yet on main names a version main
has shipped or a provides name. AGENTS lists the tool; RELEASES §7 and
the packages stage read the version from it; the reviewer agent checks
for no bump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The history skips a commit whose version file doesn't parse, so a HEAD
with "0.2-beta" in it built under the number of the commit before: new
contents under a published version, the collision the tool exists to
end. The version path now checks the file at the commit it builds and
refuses, as the branch path already did.

tests/pkg-version covers it, and its --main case compares the output
instead of piping it into grep -q (AGENTS, Userspace).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A version tools/pkg-version can't work out (a version file that doesn't
parse) stopped the whole build through pkg_tar's alarm_die, and with it
the nightly publish for every phone (review lesson L-420). It is now
checked with the boot files before anything is built: that package is
skipped and named, the rest is built and signed, and the run exits 3
with the package in .skipped, which repo-publish already treats as
"publish the rest, then fail". The messages name both reasons.

tests/stage-boot-files adds such a package to its skip run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 packages install their version file under /usr/share/omamobile, and
runbooks read it on the phone (SUSPEND-PLAN cats device-cheetah's and
the shell's); with versions counted, the file only gives the series and
a stale third number. Each PKGBUILD now hands pkgver to install as
OMAMOBILE_PKGVER, and install writes it over the copy (without it, as
in the package tests, the file is copied as before). omamobile-remote
takes its printed version the same way instead of a second argument.

omamobile-voice's test compared pkgver with tools/pkg-version, which a
build tool's copy doesn't have (makepkg's check() on the phone or in
the container); it reads .pkgver there. Every package's test/all in a
copy without the repository now gives the same results as main's.

tests/pkg-version checks that every package shipping the file hands
pkgver over, and runs the installs that need no build (10 of 23).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A build of edits not committed yet got the commit's version, so
build-packages took the package as up to date and skipped it, and the
phone got a build of different contents under a published number. Before
this change, the hand-written bump avoided that only because the
contributor bumped as they edited.

Without --rev, the package's tree as it stands (tracked and new files,
gitignored ones left out) is compared with HEAD's; when they differ, its
tree id is added: 0.2.130.d5e0b7a2. pacman orders it above the commit's
build and below the next commit's (checked with vercmp), each edit is a
new version, and undoing the edits gives the commit's version back. A
package not committed at all builds as 0.1.0pre0.d<tree>, below its
first commit's 0.1.0pre1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With versions counted by tools/pkg-version, a build off main carries
.g<commit> and a build of edits not committed yet carries .d<tree>. Both
sort above the published build, so if the maintainer's out/repo held one
from local testing and was published as it stood (--no-build
development), every phone would take it over main's on the next update.

stage() now refuses an index that lists one, before it copies anything,
and names it; --from-main rebuilds main's version over it. The pattern
matches only tools/pkg-version's 7-digit form, so the release kernel's
12-digit .g<commit> passes, and the test checks both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The images and packages stages stopped with "bump packages/<device
package>/version" when the boot files were stale and out/repo already
had the current version. With versions counted by tools/pkg-version, a
hand-written bump is no longer how a package gets a new version: any
commit under the package is, and boot files are gitignored, so staging
them alone gives none.

The stages now ask for a commit under the device package, and print the
next number to write into its version file when there is nothing else to
change (read as a floor, that commit gives exactly that number).
tests/release checks both lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nted

RELEASES §7.1 describes the change over: before the merge the version
files are the published versions; the merge commit starts the count and
moves every counted package one number up (published once by the next
nightly); pull requests opened before it merge as they are, with a bump
above the count taken as a floor; the third numbers stay as floors until
the maintainer cuts the files to their series; and going back means
writing the counted versions into the files first, since their stale
numbers sit below what phones have.

CONTRIBUTING and AGENTS now say a commit subject carries no version (it
isn't known until the merge), a doc names a version only once main has
shipped it, and which packages still carry hand-written versions (those
built from another project's release, the kernel and the keyring).
AGENTS' commit subject example lost its version, its pkg-version row
gains .d<tree>, and the reviewer agent checks subjects and docs too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robotosaith

Copy link
Copy Markdown
Contributor Author

To be clear, this is a change to how everyone contributes, so it's your call. If you'd rather keep hand-written versions, or want only parts of this (say, just the uncommitted-edits fix in build-packages, or the floor without the count), I'll reshape it or close it. #689 has the reasoning if you want to weigh it first.

…rsion

Both run tools/build-packages in a copy of the repository, which since
tools/pkg-version sources tools/lib/pkg-tar.sh. The copies lacked it, so
build-packages stopped at its source line ("No such file or directory")
and release-signing's first refusal check failed in CI. Both skip on a
machine without repo-add, which is how this was missed before the push.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derekross

Copy link
Copy Markdown
Owner

Thanks, @robotosaith. You have read the problem right: the same version number written by two pull requests has cost every round a check and still slipped through, and this is a complete answer to it, not a sketch: the replay of our own history, the floor for old-style bumps, the refusal to publish a branch build, the version a package prints. Thank you also for saying up front that it's my call.

It is a change to how everyone contributes and to how I release, and my answer is: not as it stands, and yes with the first four points below settled. The first one decides it. Here is what I checked.

I merged it onto today's main in a scratch tree. tools/pr-check, tests/pkg-version (the replay included), tests/repo-publish-stage and the grep -q lint pass. Two pretend pull requests that both write 0.2.127 into the shell's version come out as 0.2.128 and 0.2.129, so the collision itself is gone, as you say.

  1. The Pixel 7 Pro's boot image. omamobile-device-cheetah carries the boot files release phones write to slot B, and today its version is my switch: changes to initramfs/init or the package's src/ merge without a bump, and I bump it myself only after an image built from them has booted on the 7 Pro (omamobile-device-cheetah 0.1.51: the boot files with /run mounted 0755 reach installed phones #667, omamobile-device-cheetah 0.1.52: the boot image with #403's reboot-to and #562's init reaches installed phones #691). With the count, any merge under packages/omamobile-device-cheetah, a README or test change included, is a new version at the next nightly, and whether new boot files go out then depends on what is staged on the build machine, or the nightly fails until I stage. tools/release's new hint (echo <next> > version) is the hand-written number coming back for exactly this case. I'd want the packages that ship boot files left on written versions, like the kernel and the keyring, unless you see a cleaner switch.

  2. The start of the count follows the tool's path. After three more shell commits the version is 0.2.130; if tools/pkg-version is then moved (with its self= line updated) it becomes 0.2.126 again, because the count restarts at the move and reads the stale version file as the published one. That is a published number for other contents, and nothing fails. The start needs an anchor that doesn't move with the tool (a commit id recorded in the tree after the merge, or per package the first commit whose PKGBUILD names the tool), and a test that moves the tool.

  3. OMAMOBILE_PKGVER_SINCE changes every counted version when it is set in a build's environment (0.2.130 became 0.2.128 in my try). tools/build-packages and tools/repo-publish shouldn't honour it; the tests could pass it another way.

  4. tests/all: new suites go on their own lines at the end of the file, not into the long for line.

  5. The rules. Please leave .claude/agents/omamobile-reviewer.md and the sentence that retires the review lessons out of the pull request; I'll change those myself if this lands. Two of the lessons you list stay in some form anyway: a >= on a change that isn't on main yet is still a guess (your §7.1 point 4 says so), and "does the package print its real version" is still worth a check.

Smaller things, for the discussion rather than the diff:

  • The tool counts against whatever origin/main is. On a fork whose own main is behind, a test build came out as 0.2.127.3.g… while the published package was 0.2.140, so it sorts below the published one. CONTRIBUTING could say to point OMAMOBILE_MAIN_REF at this repository's main.
  • A smoke report will name a .g<commit> build that no longer exists after the squash, and a plan or AGENTS note can name its version only in a second commit after the merge. That's a real cost for the device and modem pull requests, which cite versions all the time.
  • Every commit under a package republishes it to every phone, lint sweeps over the package tests included.

So: points 1 to 4, and I'll look at it again. If you'd rather land a part first, the two I'd take on their own are the refusal to publish a build that isn't main's, and uncommitted edits getting their own version. I'll note the same on #689.

robotosaith and others added 5 commits November 12, 2026 16:04
Review of derekross#690: the count started at the commit that added the tool,
found by its path, so moving tools/pkg-version restarted every count
from the stale version files (0.2.130 back to 0.2.126, a published
number for other contents, with nothing failing). And
OMAMOBILE_PKGVER_SINCE, meant for the history replay, moved every
counted version when it was set in a build's environment.

A commit now counts when its PKGBUILD, as that commit has it, reads
.pkgver; before that the version file is the version. The start is the
package's opt-in, which a move of the tool can't change: moving it
touches the PKGBUILDs, one more number. A package that keeps a written
version simply never counts. The replay takes --count-from on the
command line, with --history only; the environment variable is gone.
pkg_tar finds a counted PKGBUILD by the same .pkgver line.

tests/pkg-version adds a package that keeps its written version, a
move of the tool, the old variable ignored and --count-from refused
outside --history. tests/all runs the suite and parses the tool on
lines of their own at the end, not in the long for lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of derekross#690: this package carries the boot files release phones
write to slot B, and its version is the maintainer's switch: changes to
initramfs/init or src/ merge without one, and the version is written
only after an image built from them has booted on the 7 Pro. Counted,
any merge under the package (a README included) would have been a new
version at the next nightly, and tools/release's hint brought the
hand-written number back for exactly this case.

Its PKGBUILD reads version again, so tools/pkg-version never counts it,
like linux-omamobile and omamobile-keyring; tests/pkg-version fails if
a package with OMAMOBILE_BOOT_FILES in its install reads .pkgver.
tools/release and RELEASES' images stage are main's again (bump the
version). RELEASES §7.1 says how the count starts (29 packages), and
drops the sentence retiring review lessons, which is the maintainer's
to change; CONTRIBUTING says how a fork counts against this
repository's main (OMAMOBILE_MAIN_REF).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of derekross#690: the maintainer changes the reviewer's checklist himself
if counted versions land.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/release went back to asking for a device-package version bump
(the device package that ships boot files keeps a written version), so
its test expects main's text again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robotosaith

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough look, and for trying it on a scratch tree. All five are in (merged with today's main):

  1. Boot files. omamobile-device-cheetah reads its version again, like the kernel and the keyring, so its number stays yours. tests/pkg-version fails if any package with OMAMOBILE_BOOT_FILES in its install gets counted. tools/release and its test are back to main's bump text. 29 packages count now.
  2. The anchor. A commit counts when its own PKGBUILD reads .pkgver. The start is the package's opt-in, not the tool's path: moving the tool touches the PKGBUILDs, which is one more number, never a restart. The test moves it (0.3.4 → 0.3.5 → 0.3.6). A package that stops reading .pkgver goes back to its file.
  3. OMAMOBILE_PKGVER_SINCE is gone. The replay uses --count-from, which is accepted only with --history, and a test sets the old variable to show it changes nothing.
  4. tests/all: the suite and the parse checks are on their own lines at the end.
  5. The reviewer agent is as on main, and the sentence about the lessons is out of RELEASES.

From your smaller notes, CONTRIBUTING now tells forks to use OMAMOBILE_MAIN_REF=upstream/main. The other two (smoke reports naming a .g build, every commit republishing) I've left for the discussion. Your offer to take just the publish refusal and the uncommitted-edits version still stands if you'd rather go that way.

@derekross

Copy link
Copy Markdown
Owner

Thank you, @robotosaith. All five points are in, and the two I cared most about are done better than I asked: the count starts at each package's own opt-in rather than at a recorded commit, and the test fails if a package that ships boot files is ever counted. I checked it merged onto today's main: tools/pr-check, tests/pkg-version (the replay included), the publish, staging, signing and local-build suites all pass; device-cheetah stays at 0.1.53 with tools/release as on main; OMAMOBILE_PKGVER_SINCE is gone; and with "every commit counts" forced in, your test fails at "the commit that adds the tool doesn't change a package's version".

Two things before I can merge it:

1. It conflicts with main again, in tests/all (#645 appended tests/install-guided where you append yours) and in the tool table in AGENTS.md (the new tools/install-guided row). Keep both sides in each; I ran the suites on that resolution and they pass.

2. A commit that a merge brought into main gets a plain number. committed() treats a commit as "on main" when main can reach it (git merge-base --is-ancestor), but the count runs on main's first-parent line. In a throwaway repository with your tool:

main after a merge commit:              0.3.1
main's next commit:                     0.3.2
checkout of c1 (merged branch commit):  0.3.1
checkout of c2 (merged branch commit):  0.3.2

So a build from inside a merged branch has a number main gives to other contents, without the .g<commit> that tools/repo-publish looks for. We squash, so it takes a true merge commit on main to get there (there is one, from October, and §7.1 says merge commits count), but it is the one thing the tool promises. This fixed it for me, and tests/pkg-version passes unchanged with it:

-  if git merge-base --is-ancestor "$rev" "$main"; then
+  # On main's own line (its first parents), not merely reachable from it: a
+  # commit a merge brought in is a branch build of the commit it left main at
+  local id later
+  id=$(git rev-parse "$rev^{commit}")
+  if git rev-list --first-parent "$main" | grep -c -x -F "$id" >/dev/null; then
     v=$(walk "$rev" | tail -1 | cut -d' ' -f2)
     [[ -n $v ]] || die "$path/version doesn't hold a version (0.2 or 0.2.5) at $rev"
     echo "$v"
     return 0
   fi
 
   base=$(git merge-base "$rev" "$main") || die "$rev shares no history with $main"
+  if [[ $base == "$id" ]]; then
+    later=$(git rev-list --first-parent "$main" "^$id" | tail -1)
+    base=$(git rev-parse "$later^1")
+  fi

With it c1 and c2 build as 0.3.0.1.g… and 0.3.0.2.g…. Please add the case above to the test.

Smaller things, for this push if you can:

  • A .pkgver left in a package directory wins over the tool where tools/build-packages decides what to build: its pkg_version() sources the PKGBUILD in place, which reads .pkgver first, while pkg_tar ships the fresh number. Nothing writes that file into a checkout today, but the tool's own message suggests passing a version that way, and on the publish machine a leftover would keep a package "up to date" for good. Could build-packages ask tools/pkg-version directly there, or refuse a .pkgver inside a git checkout?
  • A new package copied from an older PKGBUILD stays on a written version without anyone noticing, and four open pull requests add a package. A check in tests/pkg-version that every PKGBUILD reading version is on a short named list (device-cheetah, the keyring, the kernel) would catch that.
  • RELEASES §7.1 and the description say "shell 0.2.126 to 0.2.127"; main has moved, so the example is off by one already. I'd drop the numbers.
  • A release respin from a branch would now be a branch build that publish refuses, unless the build names that branch as its main line. One sentence in RELEASES where the respin is described would do.

I went through the open pull requests: none depends on a version main hasn't shipped, so the dependency caveat in §7.1 has no case today, and only three version hunks would act as floors (omamobile-modem 0.1.24 and 0.1.25, omamobile-modem-sit 0.3.37).

When it merges is mine to pick: the merge moves 29 packages one number up and the next nightly republishes them all once, so I'll place it at the end of a round's merges rather than in the middle.

robotosaith and others added 4 commits November 14, 2026 13:36
committed() took a commit for main's when main could reach it, but the
count runs on main's first-parent line, so a commit inside a branch that
a merge commit brought in got a number main gives to other contents, with
no .g<commit> for repo-publish to refuse. It now asks whether the commit
is on that line, and otherwise builds it as a branch of the commit it left
main at (the maintainer's fix on derekross#690). tests/pkg-version checks out both
commits of the merged pr-c: 0.3.3.1.g… and 0.3.3.2.g….

It also fails when a PKGBUILD reads a written version and isn't on the
short list that keeps one (device-cheetah, the keyring), so a new package
copied from an older PKGBUILD can't stay on one unnoticed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pkg_version() sourced the PKGBUILD in place, which reads a .pkgver in the
directory before asking the tool, while pkg_tar ships the fresh number. A
.pkgver left there (the tool's own message suggests passing a version that
way) would have kept a package "up to date" on the publish machine for
good. For a PKGBUILD that reads .pkgver it now asks tools/pkg-version, as
pkg_tar does; tests/build-packages-host-tools leaves a stale .pkgver and
an old build in the repository and expects "to build".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shell's 0.2.126 to 0.2.127 was already off by one as main moved, so
§7.1 says only that the 29 packages move one up. A respin built from a
branch is a branch build that repo-publish refuses unless the build names
that branch as its main line: the bundle row says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robotosaith

Copy link
Copy Markdown
Contributor Author

Thanks for trying the merge case, @derekross. All in on d02f307e:

  1. Conflict: main merged, keeping both sides in tests/all and the AGENTS.md tool table.
  2. A commit a merge brought in: your fix, as you wrote it. tests/pkg-version checks out both commits of its merged pr-c and expects 0.3.3.1.g… and 0.3.3.2.g….

Smaller things:

  • build-packages' pkg_version() asks tools/pkg-version for a PKGBUILD that reads .pkgver, as pkg_tar does. tests/build-packages-host-tools leaves a stale .pkgver and an old build in the repository and expects "to build"; it fails without the change.
  • tests/pkg-version fails when a PKGBUILD reads a written version and isn't on its list (device-cheetah, the keyring; the kernel and the upstream builds don't read one).
  • RELEASES §7.1 no longer names shell numbers, and the bundle row says a respin built from a branch is refused unless the build names that branch as its main line (OMAMOBILE_MAIN_REF).

The affected suites pass in the Arch container, and tests/all and pr-check pass here.

@derekross

Copy link
Copy Markdown
Owner

Thank you, @robotosaith. Every point from my last comment is in: the first-parent fix with its own test (and with the fix taken out, your test fails at the merged branch's first commit, as it should), build-packages asking the tool rather than trusting a leftover .pkgver, the list of packages allowed a written version, and the RELEASES wording.

That list check earned its keep straight away. Main gained a new package after your push, omamobile-install-link (#743), and on your branch merged with today's main tests/pkg-version fails with "omamobile-install-link: its PKGBUILD doesn't hand pkgver to install". So, two things, both mechanical:

1. Main moved again, and the branch now conflicts in five files: AGENTS.md (the tools/install-guided row was rewritten), docs/RELEASES.md (§11 step 5 gained a tools/build-host-sync sentence), packages/omamobile-device-cheetah/install (the auto-sleep-default lines), tests/all (two new suites at the end) and tools/build-packages (the named-only check is now && -x $d/stage). Keeping both sides works everywhere: your pkg-version row before main's install-guided row; main's step 5 with your "has a new version (counted by …)" wording in place of "has a bumped version"; in build-packages, your "no version" skip first, then main's condition with its comment.

2. Convert omamobile-install-link like the others. This is what made the suite pass for me on the merge:

--- a/packages/omamobile-install-link/PKGBUILD
-pkgver=$(cat "${startdir:-.}/version")
+pkgver=$(cat "${startdir:-.}/.pkgver" 2>/dev/null || "${startdir:-.}/../../tools/pkg-version" "${startdir:-.}")
 package() {
   cd "omamobile-installer-$_commit"
-  "$startdir/install" "$pkgdir" "$PWD" "$PWD/target/release"
+  OMAMOBILE_PKGVER=$pkgver "$startdir/install" "$pkgdir" "$PWD" "$PWD/target/release"
--- a/packages/omamobile-install-link/install
 install -Dm644 version "$d/usr/share/omamobile/install-link/version"
+# The package's own version (tools/pkg-version), which the file's
+# series doesn't give
+[[ -z ${OMAMOBILE_PKGVER:-} ]] || echo "$OMAMOBILE_PKGVER" > "$d/usr/share/omamobile/install-link/version"

With both, on the merge: tests/pkg-version (the replay now over 30 packages), the build-packages, publish, staging, signing and local-build suites, tests/tools-help and the grep -q lint all pass, and device-cheetah stays at its written 0.1.59.

When it lands is still mine to choose, as I said: the merge moves 30 packages one number up and the next nightly republishes them all, so I'll put it at the end of a round's merges. Thanks for the patience with a pull request that main keeps moving under.

robotosaith and others added 2 commits November 15, 2026 10:40
# Conflicts:
#	AGENTS.md
#	docs/RELEASES.md
#	packages/omamobile-device-cheetah/install
#	tests/all
#	tools/build-packages
Main gained the package (derekross#743) after the branch's conversion, and
tests/pkg-version refuses a PKGBUILD that reads its written version
without being on the list. pkgver now comes from .pkgver or
tools/pkg-version, and install writes it over the shipped version file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robotosaith

Copy link
Copy Markdown
Contributor Author

Thanks, @derekross, and for checking the merge against #743 before I'd seen it. Both are in:

  1. Main merged (2844b3b), keeping both sides as you described: the pkg-version row before the rewritten install-guided row in AGENTS.md; RELEASES §11 step 5 is main's, with the tools/build-host-sync paragraph and "has a new version (counted by tools/pkg-version; …)" in place of "has a bumped version"; device-cheetah's install keeps both the OMAMOBILE_PKGVER line and the auto-sleep-default lines; tests/all runs pkg-version and then main's two new suites; in build-packages, the "no version" skip comes first, then main's named-only check with its comment (and its warned=() sits next to noversion=()).
  2. omamobile-install-link is converted with your diff (a4d2674): pkgver from .pkgver or tools/pkg-version, and install writes OMAMOBILE_PKGVER over the shipped version file.

tests/pkg-version, the build-packages, repo-publish, staging, release-signing and local-build suites, and tests/tools-help pass in the Arch container; tests/all and pr-check pass here. device-cheetah stays at its written 0.1.59.

Landing it at the end of a round is fine with me.

@derekross

Copy link
Copy Markdown
Owner

On when: this lands after the 2026.11.15 release. It moves 30 packages up a number and the next nightly republishes them all, and I don't want the release candidate's package set to shift under it. Please do the re-merge of main and the conversion of the package main added since. Once the release is published I'll merge it, and I'll say here when.

@derekross

Copy link
Copy Markdown
Owner

Thank you, @robotosaith, and sorry for the crossed wires: my comment this afternoon asked again for the re-merge and the omamobile-install-link conversion, which you had already pushed this morning. Both are just as I described them. The five conflicts are resolved both ways, and the install-link change is the same diff. On the merge with main, tests/pkg-version replays all 30 counted packages, and the build-packages, publish, staging and local-build suites pass. Device-cheetah stays at its written 0.1.59.

One small thing has come up since: main merged #814 after your push, and it rewrote the tools/install-guided row in AGENTS.md right under your new tools/pkg-version row, so the branch conflicts there again (only there). The resolution is your tools/pkg-version row followed by main's new tools/install-guided row (the one that now mentions holding the phone's sleep off during the install). Nothing else needs to change. When you next merge main, that's the only hunk.

As I said, this lands after the 2026.11.15 release is published, and I'll say here when. If main moves again before then I'm happy to do that last merge myself as a commit on top of your branch, so you don't have to keep chasing it.

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.

Package versions: compute them from git instead of bumping them in every PR

2 participants