]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
ci(gentoo): depclean is only effective if it is one command
authorJo Zzsi <jozzsicsataban@gmail.com>
Tue, 19 Nov 2024 15:50:39 +0000 (10:50 -0500)
committerLaszlo <laszlo.gombos@gmail.com>
Tue, 19 Nov 2024 18:26:21 +0000 (13:26 -0500)
test/container/Dockerfile-gentoo

index dbb42e6b9656a4d7d11aa805fdd42983f32601ca..78f8a5298c48fa9d88ffdfba1b7407b480caf982 100644 (file)
@@ -33,11 +33,15 @@ RUN \
     echo 'sys-apps/systemd ukify qrcode cryptsetup' >> /etc/portage/package.use/systemd ;\
     # Support thin volumes and build all of LVM2 including daemons and tools like lvchange \
     echo 'sys-fs/lvm2 thin lvm' >> /etc/portage/package.use/lvm2 ;\
+    # force hostonly mode as this is the config recommended by https://wiki.gentoo.org/wiki/Dracut \
+    mkdir -p /usr/lib/dracut/dracut.conf.d/ ;\
+    echo 'hostonly="yes"' > /usr/lib/dracut/dracut.conf.d/50-hostonly.conf ;\
     # Ensure everything is up to date before we start \
     emerge --quiet --update --deep --newuse --autounmask-continue=y --with-bdeps=y @world
 
 # Dependencies to pass basic test
-RUN emerge --quiet --deep --autounmask-continue=y --with-bdeps=n --noreplace \
+RUN \
+emerge --quiet --deep --autounmask-continue=y --with-bdeps=n --noreplace \
     app-alternatives/cpio \
     app-arch/cpio \
     app-emulation/qemu \
@@ -49,10 +53,8 @@ RUN emerge --quiet --deep --autounmask-continue=y --with-bdeps=n --noreplace \
     sys-kernel/gentoo-kernel-bin \
     sys-libs/libxcrypt \
     virtual/libelf \
-    virtual/pkgconfig
-
-# Dependencies for full testsuite
-RUN \
+    virtual/pkgconfig ;\
+# Dependencies for full testsuite \
 if [ "$OPTION" = "systemd" ] ; then \
     emerge --quiet --deep --autounmask-continue=y --with-bdeps=n --noreplace \
     app-alternatives/bc \
@@ -82,13 +84,6 @@ if [ "$OPTION" = "systemd" ] ; then \
     sys-fs/multipath-tools \
     sys-fs/squashfs-tools \
     sys-libs/glibc \
-; fi
-
-# cleanup
-# force hostonly mode as this is the config recommended by Gentoo wiki
-# https://wiki.gentoo.org/wiki/Dracut
-RUN \
-    rm -rf /var/cache/* /usr/share/doc/* /usr/share/man/* ;\
-    emerge --depclean --with-bdeps=n ;\
-    mkdir -p /usr/lib/dracut/dracut.conf.d/ ;\
-    echo 'hostonly="yes"' > /usr/lib/dracut/dracut.conf.d/50-hostonly.conf
+; fi ;\
+rm -rf /var/cache/* /usr/share/doc/* /usr/share/man/* ;\
+emerge --depclean --with-bdeps=n