Skip to content

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

Merged
ptr727 merged 2 commits into
developfrom
feature/auto-2597
Oct 9, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/auto-2597

Conversation

@ptr727

@ptr727 ptr727 commented Oct 9, 2026

Copy link
Copy Markdown
Owner

setup-github.sh's package_installed now matches ^(install|hold) ok installed, so a package held with apt-mark hold counts as installed instead of being sent to apt-get install -y. A new TestPackageInstalled class stubs dpkg-query for installed, held, removed, and unknown statuses, and the held case fails without the fix. The two classes share one sourced-function runner.

Closes on promotion: #2597

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings October 9, 2026 05:48
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 736f1ef3-b5f7-4764-a81b-61a11220688d
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved review issues were identified.

0 open findings

What changed in this PR

Updates Linux package detection so held packages count as installed, with focused status tests.

Changes:

  • Recognizes both installed and held Debian packages.
  • Adds tests for installed, held, removed, and unknown states.
  • Reuses the sourced-function test runner.
File Summary
tests/​test_setup_github.py Adds package status tests and shared runner.
host-setup/​linux/​setup-github.sh Recognizes held packages as installed.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.33%. Comparing base (52e85b3) to head (b351292).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2625   +/-   ##
========================================
  Coverage    59.33%   59.33%           
========================================
  Files           16       16           
  Lines         8280     8280           
========================================
  Hits          4913     4913           
  Misses        3367     3367           
Flag Coverage Δ
python-3.13 59.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727
ptr727 merged commit 225e1e9 into develop Oct 9, 2026
14 checks passed
ptr727 added a commit that referenced this pull request Oct 9, 2026
Promotes develop to main, carrying one change: `setup-github.sh` counts
a package held with `apt-mark hold` as installed (#2625).

Fixes #2597

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@ptr727
ptr727 deleted the feature/auto-2597 branch October 9, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants