Skip to content

mux: forced package_manager check fails use_cached starts when the package manager is missing #1099

Description

@ibetitsmike

Follow-up from #1095 (review thread #1095 (comment)).

scripts/install.sh.tftpl validates a forced package_manager (command -v "$PM_CMD") right after the offline check, before it looks at the cached binary. With use_cached = true, a valid Mux install and a rebuilt image that no longer ships the configured package manager, the script exits with "Configured package manager '...' not found on PATH" even though use_cached promises to run whatever copy is present without touching the registry.

Proposed change: keep the package-manager detection where it is (the version lookup needs PM_CMD), but move the hard failure for a missing forced package manager to the NEEDS_INSTALL = true branch. When use_cached short-circuits, the check is never reached; when the version lookup cannot resolve because the package manager is missing, the install branch fails with the same message as today. Add a container test: forced package_manager, use_cached = true, binary present, package manager absent, expect the start to succeed.

Xum acted on behalf of @ibetitsmike when filing this issue.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions