feat(deb): only run apt update as superuser
Metadata
Current evaluation
Merged PR #752 as commit 425a84f1, replacing an environment-variable check with os.geteuid() so apt-get update runs only as root.
Resolution: closed resolved
Reason: PR canonical/craft-parts#752 was approved and merged as commit 425a84f1. The resulting code skips apt-get update with a warning when the effective user ID is not root.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Instead of relying on a user-supplied environment variable, check for
the user id and skip running ``apt update`` if not running as root.
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #752 as commit 425a84f1, replacing an environment-variable check with os.geteuid() so apt-get update runs only as root. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/craft-parts#752 via commit 425a84f1, making Debian packaging run apt update only as root instead of relying on a user-supplied environment variable. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. The Debian packaging script now conditionally runs apt update only when executed as root, replacing environment variable checks with a direct UID check. Approved by two reviewers, passed CI, and changed eight files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a deb packaging update that replaces an environment variable check with a root UID verification. The script now only executes apt update when running as superuser. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #753 feat(deb): Don't run apt-get update as non-root user | craft-parts | closed | Duplicate PR closed unmerged: author confirmed it was superseded by merged PR #752 (commit 425a84f1), which made Debian packaging run apt-get update only as superuser. |