... otherwise switch them to automatic installation mode.
Unified · Split
| @@ -139,7 +139,12 @@ generate_initramfs() { · 138 unmodified lines | ||
| 139 | 139 | |
| 140 | 140 | cleanup_rootfs() { |
| 141 | 141 | for f in ${INITRAMFS_PKGS}; do |
| 142 | − xbps-remove -r $ROOTFS -Ry ${f} || die "Failed to remove $f from rootfs" | |
| 142 | + revdeps=$(xbps-query -r $ROOTFS -X $f) | |
| 143 | + if [ -n "$revdeps" ]; then | |
| 144 | + xbps-pkgdb -r $ROOTFS -m auto $f | |
| 145 | + else | |
| 146 | + xbps-remove -r $ROOTFS -Ry ${f} >/dev/null 2>&1 | |
| 147 | + fi | |
| 143 | 148 | done |
| 144 | 149 | rm -r $ROOTFS/usr/lib/dracut/modules.d/01vmklive |
| 145 | 150 | } |