Bug#490290: live-helper: Could handle empty LH_LINUX_PACKAGES more gracefully
- Subject: Bug#490290: live-helper: Could handle empty LH_LINUX_PACKAGES more gracefully
- From: cyril.brulebois at kerlabs.com (Cyril Brulebois)
- Date: Fri, 11 Jul 2008 12:07:50 +0200
- Message-id: <[🔎] 20080711100750.5110.99329.reportbug@localhost>
Package: live-helper
Version: 1.0~a47-1
Severity: minor
Hi,
currently, if one tries and sets LH_LINUX_PACKAGES to the empty string,
it ends up with the following:
| P: Being installing packages...
| [apt output]
| E: Regex compilation error - Invalid preceding regular expression
I first tried to workaround this with the attached patch, but it looks
the ?offending? code is rather in functions/defaults.sh, under ?# Set
linux packages?, since the following ends up in the package list:
| [chroot/root/chroot_packages]
| linux-image-2.6-486
| ${LH_UNION_FILESYSTEM}-modules-2.6-486
| # and much more
Looks like we're back to an interpolation problem. ;-)
Cheers,
--
Cyril Brulebois
-------------- next part --------------
>From 373f6e1e94c81475f313b92c2b38bc7bc2b6aa91 Mon Sep 17 00:00:00 2001
From: Cyril Brulebois <cyril.brulebois at kerlabs.com>
Date: Fri, 11 Jul 2008 11:54:04 +0200
Subject: [PATCH] Try and fix LH_LINUX_PACKAGES gracefully.
---
helpers/lh_chroot_linux-image | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/helpers/lh_chroot_linux-image b/helpers/lh_chroot_linux-image
index 56f4da4..cb71bbd 100755
--- a/helpers/lh_chroot_linux-image
+++ b/helpers/lh_chroot_linux-image
@@ -63,6 +63,12 @@ EOF
# mv chroot/usr/sbin/update-initramfs chroot/usr/sbin/update-initramfs.live-helper
#fi
+ if [ -z "${LH_LINUX_PACKAGES}" ]
+ then
+ Echo_message "LH_LINUX_PACKAGES is empty, assuming 'none' was meant."
+ LH_LINUX_PACKAGES="none"
+ fi
+
if [ "${LH_LINUX_PACKAGES}" != "none" ]
then
for FLAVOUR in ${LH_LINUX_FLAVOURS}
--
1.5.6
Reply to: