summaryrefslogtreecommitdiff
path: root/helpers/lh_chroot_linux-image
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2008-01-17 20:54:10 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:35:54 +0100
commitc87301732bf423edcb372937ad03ab83106dad4a (patch)
tree4b226d11bd50de84ed6728abee825f921a30d2a1 /helpers/lh_chroot_linux-image
parent74b2c5778d24951accb7a46b120390bdfbb34fc2 (diff)
downloadlive-build-c87301732bf423edcb372937ad03ab83106dad4a.zip
live-build-c87301732bf423edcb372937ad03ab83106dad4a.tar.gz
Installing initramfs generator from local-packages, if available.
Diffstat (limited to 'helpers/lh_chroot_linux-image')
-rwxr-xr-xhelpers/lh_chroot_linux-image25
1 files changed, 24 insertions, 1 deletions
diff --git a/helpers/lh_chroot_linux-image b/helpers/lh_chroot_linux-image
index af93d1d..5b519b8 100755
--- a/helpers/lh_chroot_linux-image
+++ b/helpers/lh_chroot_linux-image
@@ -82,7 +82,10 @@ EOF
done
fi
- PACKAGES="${PACKAGES} ${LH_INITRAMFS}"
+ if ! ls config/chroot_local-packages/${LH_INITRAMFS}*.deb > /dev/null 2>&1
+ then
+ PACKAGES="${PACKAGES} ${LH_INITRAMFS}"
+ fi
# Installing linux-image, modules and ${LH_INITRAMFS}
case "${LH_APT}" in
@@ -95,6 +98,26 @@ EOF
;;
esac
+ if ls config/chroot_local-packages/${LH_INITRAMFS}*.deb > /dev/null 2>&1
+ then
+ cp config/chroot_local-packages/${LH_INITRAMFS}*.deb chroot/root
+
+ Chroot "dpkg -i /root/${LH_INITRAMFS}*.deb" || true
+
+ # Cleaning dependencies
+ case "${LH_APT}" in
+ apt|apt-get)
+ Chroot "apt-get install -f --yes"
+ ;;
+
+ aptitude)
+ Chroot "aptitude install -f --assume-yes"
+ ;;
+ esac
+
+ rm -f chroot/root/${LH_INITRAMFS}*.deb
+ fi
+
# Saving cache
Save_cache cache/packages_linux-image