-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Allow apt-get update to accept release info changes dynamically #3611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Allow apt-get update to accept release info changes dynamically #3611
Conversation
…eInfo change (backward-compatible)
…pt-compatibility Fix workspace APT compatibility with Ubuntu PPAs by supporting Releas…
…pt-compatibility Allow apt-get update to accept release info changes dynamically
- Fixed the condition that sets the APT_GET_UPDATE_OPTIONS variable based on the WORKSPACE_ALLOW_RELEASE_INFO_CHANGE environment variable. - Ensured proper syntax for condition evaluation to correctly pass the empty string when false.
…pt-compatibility Fix: Correct condition to set APT_GET_UPDATE_OPTIONS in Dockerfile
…pt-compatibility Fix variable name
Just tested on Windows, seems to be working fine. |
Hey @Th3Trig3rFac3, thanks for testing it on Windows! glad to hear its working fine. Really appreciate you taking your time to check it out!!
|
Hi @Th3Trig3rFac3 Please check at your convenient time and let me know your feedback, please
|
Looking good on my end, working as intended. |
Summary
This PR fixes a common build failure in the
workspace
container caused by upstream Ubuntu PPA metadata changes (ReleaseInfo
changes).It introduces a new environment variable
WORKSPACE_ALLOW_RELEASE_INFO_CHANGE
(default:false
) to optionally allow APT to accept suite/label changes without manual intervention.Problem
When building the workspace container, users may encounter APT errors regarding repository metadata changes:
This problem occurs more frequently after upgrading to newer operating systems such as macOS Sequoia 15.4.1, due to stricter base image validations or upstream repository changes.
However, it is not specific to macOS — it can happen on any OS whenever Ubuntu-based repositories modify their metadata.
Root Cause
Proposed Fix
.env
variable:WORKSPACE_ALLOW_RELEASE_INFO_CHANGE
.true
, dynamically pass the--allow-releaseinfo-change
flag toapt-get update
during build time.false
(default), APT behaves normally without accepting release info changes.How it Works
ARG WORKSPACE_ALLOW_RELEASE_INFO_CHANGE
andENV WORKSPACE_ALLOW_RELEASE_INFO_CHANGE
in the workspace Dockerfile.RUN
block, the script checks the value of this environment variable.--allow-releaseinfo-change
flag is appended to theapt-get update
command./etc/apt/apt.conf.d/
).Benefits
Checklist
WORKSPACE_ALLOW_RELEASE_INFO_CHANGE=true
andfalse
Suggested Documentation Update
Add this line into the
workspace
section of.env.example
: