Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ ENV MFT_VERSION=4.33.0-169
ARG PACKAGES="dpkg-dev=1.22.6ubuntu6.5"

# 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 +54 to +58
Copy link

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.list fallback, this only uncomments existing deb-src lines (s/^#\s*deb-src/deb-src/). On images where deb-src entries are absent (common for minimal bases), this won’t enable source repos, and apt-get source ${PACKAGES} will still fail. If the goal is to reliably enable deb-src across bases, this branch likely needs to also add matching deb-src entries when none exist (or transform debdeb-src lines) rather than only uncommenting.


RUN apt-get update -y
RUN apt-get install -y --no-install-recommends ${PACKAGES}
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile.nic-configuration-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link

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

Same as Dockerfile: the /etc/apt/sources.list fallback only uncomments pre-existing deb-src lines. If the base image’s sources.list doesn’t contain any deb-src entries, apt-get source ${PACKAGES} can still fail even though this block ran. Consider adding deb-src entries (or transforming corresponding deb lines) when no deb-src lines exist, instead of only uncommenting.


RUN apt-get update -y
RUN apt-get install -y --no-install-recommends ${PACKAGES}
Expand Down
Loading