Skip to content

Update apt before installing packages#3711

Merged
robgjansen merged 1 commit intoshadow:mainfrom
robgjansen:apt-update
Jan 8, 2026
Merged

Update apt before installing packages#3711
robgjansen merged 1 commit intoshadow:mainfrom
robgjansen:apt-update

Conversation

@robgjansen
Copy link
Copy Markdown
Member

@robgjansen robgjansen commented Jan 8, 2026

Whenever using apt, we should be updating it first to pull in any package server changes made since the OS image was created.

(Also, I think apt is more modern than apt-get. apt-get output is stable while apt is not, but we're not relying on the output here so 🤷 I made the change.)

@robgjansen robgjansen added this to the Code health and maintenance milestone Jan 8, 2026
@robgjansen robgjansen self-assigned this Jan 8, 2026
@robgjansen robgjansen added the Component: Build Build/install tools and dependencies label Jan 8, 2026
@github-actions github-actions bot added Component: Testing Unit and integration tests and frameworks and removed Component: Build Build/install tools and dependencies labels Jan 8, 2026
@robgjansen robgjansen requested a review from a team January 8, 2026 17:48
Copy link
Copy Markdown
Contributor

@sporksmith sporksmith left a comment

Choose a reason for hiding this comment

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

I don't think apt-get is going away anytime soon, and that apt isn't intended for scripting usage in general. OTOH I'm not aware of any practical problems with using apt when we're not parsing output, other than the annoying warnings

@sporksmith
Copy link
Copy Markdown
Contributor

The warning WARNING: apt does not have a stable CLI interface. Use with caution in scripts. implies that it may be a bit more likely than apt-get for given arguments to stop working or have different behavior in the future, though again IDK how likely this is to be a problem in practice

@robgjansen
Copy link
Copy Markdown
Member Author

OK, I'll switch back to apt-get if for no other reason than to avoid the annoying warnings :) Thanks!

@robgjansen robgjansen enabled auto-merge January 8, 2026 18:10
@robgjansen robgjansen merged commit f0910eb into shadow:main Jan 8, 2026
26 checks passed
@robgjansen robgjansen deleted the apt-update branch January 8, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Testing Unit and integration tests and frameworks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants