We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent baac937 commit 906652aCopy full SHA for 906652a
1 file changed
mklive.sh
@@ -227,13 +227,21 @@ generate_initramfs() {
227
esac
228
}
229
230
+array_contains() {
231
+ local -n arr="$1"
232
+ local val="$2"
233
+ printf '%s\0' "${arr[@]}" | grep -Fxqz "$val"
234
+}
235
+
236
cleanup_rootfs() {
237
for f in "${INITRAMFS_PKGS[@]}"; do
- revdeps=$(xbps-query -r "$ROOTFS" -X $f)
- if [ -n "$revdeps" ]; then
- xbps-pkgdb -r "$ROOTFS" -m auto $f
- else
- 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
245
fi
246
done
247
rm -r "$ROOTFS"/usr/lib/dracut/modules.d/01vmklive
0 commit comments