File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -227,13 +227,21 @@ generate_initramfs() {
227227 esac
228228}
229229
230+ array_contains () {
231+ local -n arr=" $1 "
232+ local val=" $2 "
233+ printf ' %s\0' " ${arr[@]} " | grep -Fxqz " $val "
234+ }
235+
230236cleanup_rootfs () {
231237 for f in " ${INITRAMFS_PKGS[@]} " ; do
232- revdeps=$( xbps-query -r " $ROOTFS " -X $f )
233- if [ -n " $revdeps " ]; then
234- xbps-pkgdb -r " $ROOTFS " -m auto $f
235- else
236- xbps-remove -r " $ROOTFS " -Ry ${f} > /dev/null 2>&1
238+ if ! array_contains PACKAGE_LIST $f ; then
239+ revdeps=$( xbps-query -r " $ROOTFS " -X $f )
240+ if [ -n " $revdeps " ]; then
241+ xbps-pkgdb -r " $ROOTFS " -m auto $f
242+ else
243+ xbps-remove -r " $ROOTFS " -Ry ${f} > /dev/null 2>&1
244+ fi
237245 fi
238246 done
239247 rm -r " $ROOTFS " /usr/lib/dracut/modules.d/01vmklive
You can’t perform that action at this time.
0 commit comments