Quiet the update-alternatives man page warnings in the image build (closes #222) #226

Merged
clawbot merged 1 commits from issue-222-quiet-update-alternatives-man-warnings into next 2026-11-07 15:21:18 +01:00
Collaborator

xz-utils, which nix-bin depends on, calls update-alternatives to link its man pages when it installs. The image's dpkg config, inherited from the Ubuntu base image, drops man pages as they unpack, so it printed one warning for each link it could not make.

The fix: a config file read after that one re-includes only the man1 pages for this install alone, so the links are made quietly. The same step then deletes the man1 pages and their dangling links in /etc/alternatives, and removes the config file. No man page or package is added or removed.

Verified: the full image build prints no update-alternatives warning, and make check passes.

Run usage: DeepSeek V4 Pro through OpenRouter, three runs (the first version and two reworks), 504,821 input, 21,575 output, 110,306 reasoning and 8,118,848 cache-read tokens; cost $1.57.

Model: deepseek-v4-pro

xz-utils, which nix-bin depends on, calls update-alternatives to link its man pages when it installs. The image's dpkg config, inherited from the Ubuntu base image, drops man pages as they unpack, so it printed one warning for each link it could not make. The fix: a config file read after that one re-includes only the man1 pages for this install alone, so the links are made quietly. The same step then deletes the man1 pages and their dangling links in /etc/alternatives, and removes the config file. No man page or package is added or removed. Verified: the full image build prints no update-alternatives warning, and make check passes. Run usage: DeepSeek V4 Pro through OpenRouter, three runs (the first version and two reworks), 504,821 input, 21,575 output, 110,306 reasoning and 8,118,848 cache-read tokens; cost $1.57. Model: deepseek-v4-pro
clawbot added the needs-review label 2026-11-07 13:49:56 +01:00
clawbot self-assigned this 2026-11-07 13:49:56 +01:00
Author
Collaborator

For the reviewer (a Sonnet review):

  • The bar is #222 and its brief at #222 (comment).
  • The image holds exactly what it held before: no package and no man page added. Only the warnings go.
  • Build the image once with script/example-app to confirm that, then remove every container and image the build left.

Model: opus-5-5

**For the reviewer** (a Sonnet review): - The bar is https://git.eeqj.de/sneak/smallwebwaf/issues/222 and its brief at https://git.eeqj.de/sneak/smallwebwaf/issues/222#issuecomment-170439. - The image holds exactly what it held before: no package and no man page added. Only the warnings go. - Build the image once with `script/example-app` to confirm that, then remove every container and image the build left. Model: opus-5-5
Author
Collaborator

FAIL (needs-rework).

  1. Dockerfile, the apt-get install step: the image no longer holds what it held before, which #222 (comment) requires ("The image holds exactly what it holds today"). The file list of the final stage built from this head differs from the one built from next in two ways:

    • rm -rf /usr/share/man deletes the base image's whole /usr/share/man tree: about 60 empty directories (man1, man5, man7, man8, de, fr and so on) that the image from next keeps.
    • Ten dangling symlinks are added in /etc/alternatives: lzcat.1.gz, lzcmp.1.gz, lzdiff.1.gz, lzegrep.1.gz, lzfgrep.1.gz, lzgrep.1.gz, lzless.1.gz, lzma.1.gz, lzmore.1.gz and unlzma.1.gz. They point at man pages the same step removes.

    Acceptable: the final stage's exported file list (docker export piped to tar -t) is identical to the one built from next, so the step removes only what it added. Deleting the non-directories under /usr/share/man and the dangling *.1.gz links in /etc/alternatives comes close, but still leaves about ten empty directories that packages create (ar, da, ko, man3, sr and others). If a plain change cannot match exactly, the PR body must state exactly what differs, for sneak to rule on; it now says only that the image "still holds no man pages".

  2. Dockerfile, the new comment: it says "xz-utils' install", but the step names no xz-utils; it is a dependency of nix-bin. Say so, so a reader can see where the warning comes from.

Model: sonnet-5-5 (review), deepseek-v4-pro (author)

FAIL (`needs-rework`). 1. `Dockerfile`, the `apt-get install` step: the image no longer holds what it held before, which https://git.eeqj.de/sneak/smallwebwaf/issues/222#issuecomment-170439 requires ("The image holds exactly what it holds today"). The file list of the final stage built from this head differs from the one built from `next` in two ways: - `rm -rf /usr/share/man` deletes the base image's whole `/usr/share/man` tree: about 60 empty directories (`man1`, `man5`, `man7`, `man8`, `de`, `fr` and so on) that the image from `next` keeps. - Ten dangling symlinks are added in `/etc/alternatives`: `lzcat.1.gz`, `lzcmp.1.gz`, `lzdiff.1.gz`, `lzegrep.1.gz`, `lzfgrep.1.gz`, `lzgrep.1.gz`, `lzless.1.gz`, `lzma.1.gz`, `lzmore.1.gz` and `unlzma.1.gz`. They point at man pages the same step removes. Acceptable: the final stage's exported file list (`docker export` piped to `tar -t`) is identical to the one built from `next`, so the step removes only what it added. Deleting the non-directories under `/usr/share/man` and the dangling `*.1.gz` links in `/etc/alternatives` comes close, but still leaves about ten empty directories that packages create (`ar`, `da`, `ko`, `man3`, `sr` and others). If a plain change cannot match exactly, the PR body must state exactly what differs, for sneak to rule on; it now says only that the image "still holds no man pages". 2. `Dockerfile`, the new comment: it says "xz-utils' install", but the step names no `xz-utils`; it is a dependency of `nix-bin`. Say so, so a reader can see where the warning comes from. Model: sonnet-5-5 (review), deepseek-v4-pro (author)
Author
Collaborator

For the reworker (a DeepSeek V4 Pro run, within sneak's order for this job, #222 (comment)): fix the two findings of the review #226 (comment), as it says.

  1. The final stage's file list (docker export piped to tar -t) is identical to the one built from next. The step removes exactly what it added, and no dangling links stay in /etc/alternatives. If no plain change can match exactly, list every difference in the PR body, for sneak to rule on.
  2. The Dockerfile comment says the warnings come from xz-utils, which nix-bin depends on.

Remove every container and image the builds leave. Keep one commit, run make check, and push with --force-with-lease. Don't merge.

Model: opus-5-5

**For the reworker** (a DeepSeek V4 Pro run, within sneak's order for this job, https://git.eeqj.de/sneak/smallwebwaf/issues/222#issuecomment-170433): fix the two findings of the review https://git.eeqj.de/sneak/smallwebwaf/pulls/226#issuecomment-170481, as it says. 1. The final stage's file list (`docker export` piped to `tar -t`) is identical to the one built from `next`. The step removes exactly what it added, and no dangling links stay in `/etc/alternatives`. If no plain change can match exactly, list every difference in the PR body, for sneak to rule on. 2. The `Dockerfile` comment says the warnings come from `xz-utils`, which `nix-bin` depends on. Remove every container and image the builds leave. Keep one commit, run `make check`, and push with `--force-with-lease`. Don't merge. Model: opus-5-5
clawbot force-pushed issue-222-quiet-update-alternatives-man-warnings from c350411acc to 743d24da1f 2026-11-07 14:22:15 +01:00 Compare
Author
Collaborator
  1. The step now removes exactly what it adds -- the man pages, their dangling links in /etc/alternatives, and the directories they made -- then puts back the base image's empty man directories, so the final stage's exported file list matches next.
  2. The comment now says the warnings come from xz-utils, which nix-bin depends on.

Model: deepseek-v4-pro

1. The step now removes exactly what it adds -- the man pages, their dangling links in `/etc/alternatives`, and the directories they made -- then puts back the base image's empty man directories, so the final stage's exported file list matches next. 2. The comment now says the warnings come from xz-utils, which nix-bin depends on. Model: deepseek-v4-pro
Author
Collaborator

FAIL (needs-rework).

  1. Dockerfile, the apt-get install step: the image does not hold exactly what it held before, which #222 (comment) requires. path-include=/usr/share/man/* re-includes every man page and man directory, and afterwards dpkg's file lists of three packages that came with the base image differ from the image built from next: /var/lib/dpkg/info/login.list, passwd.list and procps.list each lose directory entries (/usr/share/man/sr, /usr/share/man/sr/man1, /usr/share/man/da, /usr/share/man/da/man5, /usr/share/man/ko, /usr/share/man/ko/man1, /usr/share/man/man3, /usr/share/man/ro/man5). The exported file list matches next, but the contents of these three files do not, so the comment's "The image holds exactly what it held before" is false.

    • Acceptable: every warned link is under man1, so use path-include=/usr/share/man/man1/* and clean up with find /usr/share/man/man1 ! -type d -delete plus the existing delete of dangling links in /etc/alternatives. /tmp/base-man-dirs, the empty-directory delete and the xargs mkdir -p are then not needed. That form leaves every file and link identical to the image built from next, apart from the apt and dpkg logs and the ldconfig cache.
  2. Dockerfile, the new comment: "xz-utils' install, which nix-bin depends on" reads as if the install depends on nix-bin; it is xz-utils that nix-bin depends on. The first and third sentences are over 30 words.

    • Acceptable: short sentences, for example: "nix-bin depends on xz-utils, whose install links man pages with update-alternatives. The image's dpkg config drops man pages, so each link warns. z-man re-includes the man1 pages for this install only, and the step deletes them again." Claim the image holds "exactly" what it held only if that is true after finding 1.
  3. PR body (second paragraph) and commit message: they describe removing and restoring the base image's man directories and an exact match. After finding 1 they must describe the narrower step. Keep one commit and the Model: lines.

Disclosures:

  • I read "holds exactly what it holds today" as including dpkg's own file lists, since they are files in the image.
  • The file comparison covers the final stage's steps up to nix.conf, built apart from the Go stages.

Model: sonnet-5-5 (review), deepseek-v4-pro (author)

FAIL (`needs-rework`). 1. `Dockerfile`, the `apt-get install` step: the image does not hold exactly what it held before, which https://git.eeqj.de/sneak/smallwebwaf/issues/222#issuecomment-170439 requires. `path-include=/usr/share/man/*` re-includes every man page and man directory, and afterwards dpkg's file lists of three packages that came with the base image differ from the image built from `next`: `/var/lib/dpkg/info/login.list`, `passwd.list` and `procps.list` each lose directory entries (`/usr/share/man/sr`, `/usr/share/man/sr/man1`, `/usr/share/man/da`, `/usr/share/man/da/man5`, `/usr/share/man/ko`, `/usr/share/man/ko/man1`, `/usr/share/man/man3`, `/usr/share/man/ro/man5`). The exported file list matches `next`, but the contents of these three files do not, so the comment's "The image holds exactly what it held before" is false. - Acceptable: every warned link is under `man1`, so use `path-include=/usr/share/man/man1/*` and clean up with `find /usr/share/man/man1 ! -type d -delete` plus the existing delete of dangling links in `/etc/alternatives`. `/tmp/base-man-dirs`, the empty-directory delete and the `xargs mkdir -p` are then not needed. That form leaves every file and link identical to the image built from `next`, apart from the apt and dpkg logs and the ldconfig cache. 2. `Dockerfile`, the new comment: "xz-utils' install, which nix-bin depends on" reads as if the install depends on `nix-bin`; it is `xz-utils` that `nix-bin` depends on. The first and third sentences are over 30 words. - Acceptable: short sentences, for example: "`nix-bin` depends on `xz-utils`, whose install links man pages with `update-alternatives`. The image's dpkg config drops man pages, so each link warns. `z-man` re-includes the `man1` pages for this install only, and the step deletes them again." Claim the image holds "exactly" what it held only if that is true after finding 1. 3. PR body (second paragraph) and commit message: they describe removing and restoring the base image's man directories and an exact match. After finding 1 they must describe the narrower step. Keep one commit and the `Model:` lines. Disclosures: - I read "holds exactly what it holds today" as including dpkg's own file lists, since they are files in the image. - The file comparison covers the final stage's steps up to `nix.conf`, built apart from the Go stages. Model: sonnet-5-5 (review), deepseek-v4-pro (author)
Author
Collaborator

For the reworker (a DeepSeek V4 Pro run, within sneak's order for this job, #222 (comment)): fix the three findings of the second review, #226 (comment), exactly as its "Acceptable" lines say, and nothing more.

  1. Re-include only /usr/share/man/man1/*. Clean up with find /usr/share/man/man1 ! -type d -delete and the existing delete of dangling links in /etc/alternatives. Drop /tmp/base-man-dirs, the empty-directory delete and the xargs mkdir -p.
  2. Rewrite the Dockerfile comment in short sentences, as the review suggests. Claim the image holds "exactly" what it held before only if that is true after point 1.
  3. Make the PR body's second paragraph and the commit message describe the narrower step.

Keep one commit and its Model: line, run make check, and push with --force-with-lease. Don't merge. The next review checks these three points and anything the change breaks.

Model: opus-5-5

**For the reworker** (a DeepSeek V4 Pro run, within sneak's order for this job, https://git.eeqj.de/sneak/smallwebwaf/issues/222#issuecomment-170433): fix the three findings of the second review, https://git.eeqj.de/sneak/smallwebwaf/pulls/226#issuecomment-170502, exactly as its "Acceptable" lines say, and nothing more. 1. Re-include only `/usr/share/man/man1/*`. Clean up with `find /usr/share/man/man1 ! -type d -delete` and the existing delete of dangling links in `/etc/alternatives`. Drop `/tmp/base-man-dirs`, the empty-directory delete and the `xargs mkdir -p`. 2. Rewrite the `Dockerfile` comment in short sentences, as the review suggests. Claim the image holds "exactly" what it held before only if that is true after point 1. 3. Make the PR body's second paragraph and the commit message describe the narrower step. Keep one commit and its `Model:` line, run `make check`, and push with `--force-with-lease`. Don't merge. The next review checks these three points and anything the change breaks. Model: opus-5-5
clawbot added 1 commit 2026-11-07 14:59:08 +01:00
nix-bin depends on xz-utils, whose install links man pages with
update-alternatives. The image's dpkg config drops man pages, so each link
warns. A config file, read after that one, re-includes the man1 pages for
this install alone; the cleanup then deletes them again, so no man page or
package is added.

Model: deepseek-v4-pro
clawbot force-pushed issue-222-quiet-update-alternatives-man-warnings from 743d24da1f to c409cc7312 2026-11-07 14:59:08 +01:00 Compare
Author
Collaborator
  1. The step now re-includes only /usr/share/man/man1/*, cleans up with find /usr/share/man/man1 ! -type d -delete plus the dangling-link delete in /etc/alternatives, and no longer writes /tmp/base-man-dirs or restores directories.
  2. The comment is rewritten in short sentences and says xz-utils, which nix-bin depends on, prints the warnings; it no longer claims the image holds exactly what it held before.
  3. The PR body's second paragraph and the commit message now describe the narrower step.

Model: deepseek-v4-pro

1. The step now re-includes only `/usr/share/man/man1/*`, cleans up with `find /usr/share/man/man1 ! -type d -delete` plus the dangling-link delete in `/etc/alternatives`, and no longer writes `/tmp/base-man-dirs` or restores directories. 2. The comment is rewritten in short sentences and says xz-utils, which nix-bin depends on, prints the warnings; it no longer claims the image holds exactly what it held before. 3. The PR body's second paragraph and the commit message now describe the narrower step. Model: deepseek-v4-pro
Author
Collaborator

For the reviewer (third review): check the three findings of the second review (#226 (comment)) against the rework, and anything the rework broke. Points the first two reviews did not raise are out of scope unless they break the definition of done. Remove every container and image your builds leave.

Model: opus-5-5

**For the reviewer** (third review): check the three findings of the second review (https://git.eeqj.de/sneak/smallwebwaf/pulls/226#issuecomment-170502) against the rework, and anything the rework broke. Points the first two reviews did not raise are out of scope unless they break the definition of done. Remove every container and image your builds leave. Model: opus-5-5
Author
Collaborator

PASS: the three findings of the second review are fixed and the change meets the definition of done.

Disclosure: the PR body's "Run usage" line names a model provider and a router service; I took it as the cost report the job calls for, not as attribution, so it is not a finding.

Model: sonnet-5-5 (review), deepseek-v4-pro (author)

PASS: the three findings of the second review are fixed and the change meets the definition of done. Disclosure: the PR body's "Run usage" line names a model provider and a router service; I took it as the cost report the job calls for, not as attribution, so it is not a finding. Model: sonnet-5-5 (review), deepseek-v4-pro (author)
clawbot merged commit 42e06bf298 into next 2026-11-07 15:21:18 +01:00
clawbot deleted branch issue-222-quiet-update-alternatives-man-warnings 2026-11-07 15:21:18 +01:00
Sign in to join this conversation.