[oe] [PATCH 2/2] grub: allow menu.lst to be overridden using GRUB_CONFIG_PACKAGE.
Michael Smith
msmith at cbnco.com
Wed May 6 19:55:57 UTC 2009
If GRUB_CONFIG_PACKAGE is set, don't ship menu.lst with grub. Instead,
RRECOMMEND the config package. This allows overlays to override menu.lst
in a separate package, rather than copying the whole grub package into
the overlay.
Signed-off-by: Michael Smith <msmith at cbnco.com>
---
recipes/grub/grub_0.97.bb | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/recipes/grub/grub_0.97.bb b/recipes/grub/grub_0.97.bb
index ef37af1..8b68868 100644
--- a/recipes/grub/grub_0.97.bb
+++ b/recipes/grub/grub_0.97.bb
@@ -6,8 +6,16 @@ RDEPENDS = "diffutils"
PR = "r4"
SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz \
- file://automake-1.10.patch;patch=1 \
- file://menu.lst"
+ file://automake-1.10.patch;patch=1"
+
+# Set to the name of a package containing menu.lst to override the one
+# shipped with this package.
+GRUB_CONFIG_PACKAGE ?= ""
+
+SRC_URI += "${@base_conditional('GRUB_CONFIG_PACKAGE', '', \
+ 'file://menu.lst', '', d)}"
+
+RRECOMMENDS += "${GRUB_CONFIG_PACKAGE}"
inherit autotools
@@ -22,8 +30,11 @@ do_install_append() {
install -d ${D}/boot/
ln -sf ../usr/lib/grub/i386${TARGET_VENDOR}/ ${D}/boot/grub
- # TODO: better use grub-set-default script here?
- install -m 0644 ${WORKDIR}/menu.lst ${D}/boot/grub
+ if [ -z "${GRUB_CONFIG_PACKAGE}" ]
+ then
+ # TODO: better use grub-set-default script here?
+ install -m 0644 ${WORKDIR}/menu.lst ${D}/boot/grub
+ fi
}
FILES_${PN}-doc = "${datadir}"
--
1.5.6.5
More information about the Openembedded-devel
mailing list