← Back to issue list

feat(deb): only run apt update as superuser

View original Github issue

Metadata

Project
craft-parts
Number
#752
Type
pull request
State
merged
Author
cmatsuoka
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

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
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 Superseded by pull request #752. The author confirmed the change was replaced, so this pull request was closed without merging.
75%