mklive: only remove unnecessary pkgs if don't have revdeps.

... otherwise switch them to automatic installation mode.
This commit is contained in:
Juan RP 2014-12-17 18:54:43 +01:00
parent 4ab914cdf7
commit 7f49ee579c
1 changed files with 6 additions and 1 deletions

View File

@ -139,7 +139,12 @@ generate_initramfs() {
cleanup_rootfs() {
for f in ${INITRAMFS_PKGS}; do
xbps-remove -r $ROOTFS -Ry ${f} || die "Failed to remove $f from rootfs"
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
fi
done
rm -r $ROOTFS/usr/lib/dracut/modules.d/01vmklive
}