Skip to content

Count a Held Package as Installed in setup-github.sh #2597

Closed

Description

@ptr727

Problem

host-setup/linux/setup-github.sh decides whether a package is installed by matching dpkg's status against ^install ok installed. A package held with apt-mark hold has the status hold ok installed, so it reads as missing, and the script runs apt-get install -y on it. If a newer candidate exists, that can fail with "Held packages were changed and -y was used without --allow-change-held-packages".

feature/wsl-2299 (#2299) makes install-tools.sh's package_installed accept hold ok installed as well. The comment above that function says the sibling scripts check installed state the same way, so after that change the two scripts disagree.

Suggested Shape

Match ^(install|hold) ok installed in setup-github.sh too, with a test that stubs dpkg-query for each status.

Raised by the pre-push review of feature/wsl-2299.

Activity

  1. added
    bug
    script
    on Oct 8, 2026
  2. added a commit that references this issue on Oct 9, 2026
    1bec8ef
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

    bugscript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions