diff options
author | Juan RP <xtraeme@gmail.com> | 2014-12-17 18:54:43 +0100 |
---|---|---|
committer | Juan RP <xtraeme@gmail.com> | 2014-12-17 18:54:43 +0100 |
commit | 7f49ee579c84b4ef2fa4bf7e704e686fe1e3d9be (patch) | |
tree | 564c03bbfba1da1b2c0eb15ecd3a63107a1e970f /mklive.sh.in | |
parent | 4ab914cdf7cc7a42b9880d72b16417020839c280 (diff) | |
download | hrmpf-7f49ee579c84b4ef2fa4bf7e704e686fe1e3d9be.tar.gz hrmpf-7f49ee579c84b4ef2fa4bf7e704e686fe1e3d9be.tar.xz hrmpf-7f49ee579c84b4ef2fa4bf7e704e686fe1e3d9be.zip |
mklive: only remove unnecessary pkgs if don't have revdeps.
... otherwise switch them to automatic installation mode.
Diffstat (limited to 'mklive.sh.in')
-rw-r--r-- | mklive.sh.in | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mklive.sh.in b/mklive.sh.in index 14d7c68..09c6f6b 100644 --- a/mklive.sh.in +++ b/mklive.sh.in @@ -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 } |