]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
ci(debian): do not install cpio if 3cpio is installed
authorBenjamin Drung <benjamin.drung@canonical.com>
Fri, 23 Jan 2026 21:52:04 +0000 (22:52 +0100)
committerLaszlo <laszlo.gombos@gmail.com>
Fri, 23 Jan 2026 22:03:30 +0000 (17:03 -0500)
Dracut either needs 3cpio or cpio, but not both. So do not install cpio
in case 3cpio is installed.

test/container/Dockerfile-debian

index 3d5a782ec3ac22f89cc1714c873b1ee3248b6c03..cbc0f3ae3b06d6524ea5585410aa99632a7731cd 100644 (file)
@@ -19,10 +19,9 @@ ARG DISTRIBUTION
 RUN apt-get update -y -qq && apt-get upgrade -y -qq && apt-get install -y -qq --install-recommends dracut dracut-network dracut-squash dracut-live dracut-test
 
 # Install 3cpio where available
-RUN if [ "$DISTRIBUTION" != "debian:latest" ] ; then \
+RUN if [ "$DISTRIBUTION" != "debian:latest" ] ; then cpio=3cpio; else cpio=cpio; fi; \
     DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends -o Dpkg::Use-Pty=0 \
-    3cpio \
-    ; fi
+    $cpio
 
 # use GNU coreutils instead of uutil's coreutils until https://github.com/uutils/coreutils/issues/9057 and https://launchpad.net/bugs/2129037 are fixed
 RUN if [ "$DISTRIBUTION" = "ubuntu:devel" ] || [ "$DISTRIBUTION" = "ubuntu:rolling" ]; then \
@@ -38,7 +37,6 @@ RUN \
     ca-certificates \
     cargo \
     console-data \
-    cpio \
     cryptsetup \
     curl \
     dnsmasq \