-
Notifications
You must be signed in to change notification settings - Fork 8
Fix build: handle missing ubuntu.sources for deb-src #283
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,11 @@ ENV MFT_VERSION=4.33.0-169 | |
| ARG PACKAGES="dpkg-dev=1.22.6ubuntu6.5 libusb-1.0-0=2:1.0.27-1 ipmitool=1.8.19-7ubuntu0.24.04.3 rshim curl=8.5.0-2ubuntu10.6 systemd-sysv=255.4-1ubuntu8.12 mstflint=4.26.0+1-2ubuntu3" | ||
|
|
||
| # enable deb-src repos | ||
| RUN sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources | ||
| RUN if [ -f /etc/apt/sources.list.d/ubuntu.sources ]; then \ | ||
| sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources; \ | ||
| elif [ -f /etc/apt/sources.list ]; then \ | ||
| sed -i 's/^#\s*deb-src/deb-src/' /etc/apt/sources.list; \ | ||
| fi | ||
|
Comment on lines
+37
to
+41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. deb-src enablement is incomplete Same as |
||
|
|
||
| RUN apt-get update -y | ||
| RUN apt-get install -y --no-install-recommends ${PACKAGES} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deb-src enablement is incomplete
In the
/etc/apt/sources.listfallback, this only uncomments existingdeb-srclines (s/^#\s*deb-src/deb-src/). On images wheredeb-srcentries are absent (common for minimal bases), this won’t enable source repos, andapt-get source ${PACKAGES}will still fail. If the goal is to reliably enabledeb-srcacross bases, this branch likely needs to also add matchingdeb-srcentries when none exist (or transformdeb→deb-srclines) rather than only uncommenting.