Skip to content

fix(update): Debian update asks to restore a pacman database that is not installed - #173144

Closed
DonnieFi wants to merge 1 commit into
openclaw:mainfrom
DonnieFi:fix/173084-absent-pacman
Closed

DonnieFi wants to merge 1 commit into
openclaw:mainfrom
DonnieFi:fix/173084-absent-pacman

Conversation

@DonnieFi

@DonnieFi DonnieFi commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Closes #173084

What Problem This Solves

Fixes: a Debian npm update tells the operator to restore the pacman database when pacman is not installed.

User Impact

User impact: Linux hosts without pacman get a warning that pacman is not installed and that its database was not queried. The update still continues. A pacman query that runs and fails still says to restore the database, and a confirmed package-owned install is still refused.

Why This Change Was Made

Launch ENOENT is a missing executable, not a database outage. Query failures, timeouts, and owned installs keep their existing messages.

Evidence

pnpm test src/infra/update-freebsd-pkg-ownership.test.ts src/cli/update-cli/update-command-freebsd-pkg.test.ts --maxWorkers=1 passed (13 ownership tests, 11 admission tests). git diff --check passed.

Reviewed revision: 90de1e114a83d96f4bf4d5f6de06a60b977f1d5b.

Host check recorded before both runs: Debian, process.platform linux, pacman not on PATH, and /usr/bin/pacman absent. Both runs used an isolated state directory and temp directory, --dry-run --no-restart --yes, and did not restart the gateway. A non-dry-run update was not performed. Root paths and report paths are omitted below.

Before, the installed CLI OpenClaw 2026.10.5-beta.4 (6b4b2a9):

openclaw update --dry-run --no-restart --yes

Exit 0. Stderr contained this line three times:

[update] pacman inspection failed during pacman query (ENOENT). pacman ownership could not be verified. Restore access to the active pacman database and configuration, then retry. Continuing without verified system-package ownership.

Stdout then reached the end of the dry-run:

Update dry-run
No changes were applied.

  Install kind: package
  Mode: npm
  Channel: beta
  Tag/spec: [email protected]
  Current version: 2026.10.5-beta.4
  Target version: 2026.10.5-beta.4

Planned actions:
  - Refresh package install with spec [email protected]; current version already matches 2026.10.5-beta.4
  - Run plugin update sync after core update
  - Refresh shell completion cache (if needed)
  - Skip restart (because --no-restart is set)

ℹ️ OpenClaw update skipped: dry-run.
Update mode: npm

After, the same flags on this revision. node openclaw.mjs exits first on a source tree with no dist/entry.js, so this run used a local qaRuntime build that wrote gitignored dist/ only. The built launcher contains is not installed, so its package database was not queried.

node openclaw.mjs update --dry-run --no-restart --yes

Exit 0. Complete stderr:

[update] pacman is not installed, so its package database was not queried. Continuing without verified system-package ownership.
[update] pacman is not installed, so its package database was not queried. Continuing without verified system-package ownership.

Stdout continued through the dry-run plan. Install kind is git because the command was this source checkout, not the npm-global install:

Update dry-run
No changes were applied.

  Install kind: git
  Mode: git
  Channel: dev
  Tag/spec: dev
  Current version: 2026.10.3
  Target version: unresolved (Git dry-runs do not select a build-tested target version.)

Planned actions:
  - Run git update flow on channel dev (fetch/rebase/build/doctor)
  - Run plugin update sync after core update
  - Refresh shell completion cache (if needed)
  - Skip restart (because --no-restart is set)

ℹ️ OpenClaw update skipped: dry-run.
Update mode: git

A missing pacman executable is not a database outage. Linux npm updates
now say pacman is not installed and continue. A pacman query that runs
and fails still asks the operator to restore the database.

Refs: openclaw#173084
@clawsweeper

clawsweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 15, 2026
@clawsweeper

clawsweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

Distinguishes a missing package-manager executable from a failed database query in update warnings.

Example: Run openclaw update --dry-run --no-restart --yes on Debian without pacman.

  • Before: The updater asks the operator to restore the pacman database and continues.
  • After: The updater says pacman is not installed and its database was not queried, then continues.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, useful diagnostic fix with shipped-entry-point evidence and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The updated live body pins head 90de1e1 and records a Debian host without pacman running the built openclaw.mjs update entry point with --dry-run --no-restart --yes: the corrected warning appears, the plan completes, and the command exits 0. This exercises the shared admission diagnostic before Git/npm branching and resolves the earlier transcript gap; a non-dry-run upgrade is unnecessary for this message-only change.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Debian operators are told to repair a pacman database even though pacman is absent.
Reason: The patch corrects misleading recovery guidance within the established ownership policy, without new settings, defaults, or update restrictions.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Needs changes before merge - 1 item remains

This PR fixes a current misleading updater warning without changing admission behavior. The newly supplied CLI transcripts resolve the previous proof blocker, and no actionable correctness or security defect was found.

Priority: P2
Reviewed head: 90de1e114a83d96f4bf4d5f6de06a60b977f1d5b

Before merge

  • Complete next step - Mark this PR ready for review when it is intended for merge consideration.

Findings

None.

Tests

  • Missing end-to-end proof: A red-before/green-after run of the added regression is not supplied; the CLI before/after transcripts independently demonstrate the changed diagnostic.
Agent review details

How this fits together

The shared package-ownership inspector receives installation paths and package-manager query results, then either rejects confirmed package ownership or warns and allows update admission to continue.

flowchart TD
  A[Update CLI or Gateway] --> B[Shared ownership inspector]
  B --> C[Buffered package manager query]
  C --> D[Classify query result]
  D --> E[Confirmed owner blocks replacement]
  D --> F[Unavailable inspection warns and continues]
Loading

Technical review

Best possible solution:

Correct missing-executable guidance in the existing shared inspector while retaining warning-and-continue and confirmed-owner refusal.

Do we have a high-confidence way to reproduce the issue?

Current main deterministically turns a Linux pacman launch ENOENT into database-restoration guidance, matching the supplied Debian transcript; this review executed no target code.

Is this the best way to solve the issue?

The focused change classifies the launch failure at its existing owner and preserves all admission outcomes, avoiding distribution detection or a parallel ownership mechanism.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against c8260d933e58.

Provenance checked

  • Shared package-manager inspection and unavailable-query diagnostic keeps the original intent (5d9a5ff: Protect system-package-owned installations while letting unavailable or failing inspections warn and continue.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 5d9a5ff adds src/infra/update-system-package-ownership.ts:46 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5d9a5ff1b44c; files: src/infra/update-system-package-ownership.ts)
  • Vincent Koc: Raw commit dfaec13 adds src/infra/update-freebsd-pkg-ownership.test.ts:97 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: dfaec136991a; files: src/infra/update-freebsd-pkg-ownership.test.ts)

PR surface

Source +7, Tests +40. Total +47 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 11 4 +7
Tests 1 40 0 +40
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 51 4 +47

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: Incorrect recovery instructions cause avoidable troubleshooting, but the update continues and no installation failure is introduced.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-15T13:07:17.334Z sha 90de1e1 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-15T15:30:06.718Z sha 90de1e1 :: needs real behavior proof before merge. :: none

Reviewed October 15, 2026, 11:51 AM ET / 15:51 UTC (Revision 3).

@DonnieFi

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Added the dry-run transcripts to the PR body. Installed beta.4 still says to restore the pacman database and then continues (Update dry-run / No changes were applied.). The patched checkout says pacman is not installed and its database was not queried, then continues the same way. No non-dry-run update was performed.

@clawsweeper

clawsweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@DonnieFi

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The PR body now includes the isolated command transcripts for reviewed revision 90de1e1: absent pacman, the corrected warning, exit 0, and the continued dry-run plan (Update dry-run / No changes were applied.). Host paths are omitted. No non-dry-run update was run.

@clawsweeper

clawsweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 15, 2026
steipete added a commit that referenced this pull request Oct 15, 2026
…abase-restore advice (#173293)

A Debian npm update told the operator to restore the pacman database: when a system package manager's executable is absent (ENOENT), the ownership inspector reused its database-restoration advice. It now says the executable was not found and that ownership could not be verified; confirmed-owner refusal and continuation are unchanged. Supersedes #173118, #173122, #173144, thanks @wangmiao0668000666, @sunlit-deng, @DonnieFi.

Fixes #173084

Co-authored-by: wangmiao0668000666 <[email protected]>
Co-authored-by: sunlit-deng <[email protected]>
Co-authored-by: Donnie Fiander <[email protected]>
@steipete

Copy link
Copy Markdown
Contributor

Thanks for this! We landed the fix in #173293 (92280e2), which supersedes this PR and credits you as co-author. A missing package-manager executable now says the executable was not found instead of advising a database restore.

@steipete steipete closed this Oct 15, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
…abase-restore advice (openclaw#173293)

A Debian npm update told the operator to restore the pacman database: when a system package manager's executable is absent (ENOENT), the ownership inspector reused its database-restoration advice. It now says the executable was not found and that ownership could not be verified; confirmed-owner refusal and continuation are unchanged. Supersedes openclaw#173118, openclaw#173122, openclaw#173144, thanks @wangmiao0668000666, @sunlit-deng, @DonnieFi.

Fixes openclaw#173084

Co-authored-by: wangmiao0668000666 <[email protected]>
Co-authored-by: sunlit-deng <[email protected]>
Co-authored-by: Donnie Fiander <[email protected]>
RomneyDa added a commit that referenced this pull request Oct 22, 2026
…abase-restore advice (#173293)

A Debian npm update told the operator to restore the pacman database: when a system package manager's executable is absent (ENOENT), the ownership inspector reused its database-restoration advice. It now says the executable was not found and that ownership could not be verified; confirmed-owner refusal and continuation are unchanged. Supersedes #173118, #173122, #173144, thanks @wangmiao0668000666, @sunlit-deng, @DonnieFi.

Fixes #173084

Co-authored-by: wangmiao0668000666 <[email protected]>
Co-authored-by: sunlit-deng <[email protected]>
Co-authored-by: Donnie Fiander <[email protected]>
(cherry picked from commit 92280e2)
Co-authored-by: RomneyDa <[email protected]>
RomneyDa pushed a commit that referenced this pull request Oct 27, 2026
…abase-restore advice (#173293)

A Debian npm update told the operator to restore the pacman database: when a system package manager's executable is absent (ENOENT), the ownership inspector reused its database-restoration advice. It now says the executable was not found and that ownership could not be verified; confirmed-owner refusal and continuation are unchanged. Supersedes #173118, #173122, #173144, thanks @wangmiao0668000666, @sunlit-deng, @DonnieFi.

Fixes #173084

Co-authored-by: wangmiao0668000666 <[email protected]>
Co-authored-by: sunlit-deng <[email protected]>
Co-authored-by: Donnie Fiander <[email protected]>
(cherry picked from commit 92280e2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Debian npm update tells the operator to restore the pacman database

2 participants