Skip to content

Install failure from the sysroot update reaches the interface with an empty reason #652

Closed

Description

@Sunrisepeak

What happens

When the step that updates a subos sysroot after an install is refused, the install fails with an empty reason on the interface wire:

E_INTERNAL: [cmdline] failed:

The reason is printed only by log::error, so it is visible with -v and nowhere else:

[error] cmdline: sysroot update refused before metadata changed: Scrt1.o@glibc-2.44.3: installed asset registration missing
[error] [cmdline] failed:
  ✗ 1 package(s) failed

A client (mcpp) gets ErrorEvent{code: E_INTERNAL, message: "[cmdline] failed: "} and has nothing to show the user. Seen in mcpp's e2e CI (mcpp-community/mcpp#792) and reproduced with 2026.10.9.2 and 2026.10.10.2.

Where

src/core/xim/installer.cpp, run_config_hook_:

  • A package without a config hook returns process_xvm_operations_(...) directly (line ~2391), and *failureMessage is never set. The caller (~3705) reports InstallPhase::Failed with that empty configFailure.
  • With a config hook, the same failure is reported as "config hook failed" (~2412), which is non-empty but also drops the reason.
  • process_xvm_operations_ has about fifteen return false sites (~2143–2304), each of which logs its reason and returns no text. "sysroot update refused before metadata changed: …" (~2253) is one of them.

Reproduce

  1. Make an XLINGS_HOME whose active subos workspace projects assets that the home's version ledger (.xlings.json versions) does not register, e.g. link subos/ from another home that has xim:glibc installed.
  2. xlings install mcpplibs:cmdline@0.0.2 -y (a source-only package, no config hook).
  3. Interface: E_INTERNAL: [cmdline] failed: . CLI: [cmdline] failed: with no reason unless -v.

(The state in step 1 came from a test harness, so the refusal itself may be correct; the issue is the missing reason.)

Proposal

process_xvm_operations_ returns std::expected<void, std::string> (or takes the failureMessage out-parameter), so every refusal carries its text to InstallStatus.message. The no-config-hook path then reports the same reason as the hook path, and "config hook failed" is replaced by the actual cause. A test: an install whose sysroot update is refused emits a Failed status with a non-empty message that names the asset.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions