summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2009-12-12 18:09:30 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2009-12-12 18:09:30 +0000
commitb2adaab37695c2733982022e8ea2fa1c82d360c4 (patch)
tree7683722b2fcddb0b6f02a3408228d84c6d98d7ef
parentFixed parallel make failures in tests (see bug #295964). (diff)
downloadhistorical-b2adaab37695c2733982022e8ea2fa1c82d360c4.tar.gz
historical-b2adaab37695c2733982022e8ea2fa1c82d360c4.tar.bz2
historical-b2adaab37695c2733982022e8ea2fa1c82d360c4.zip
Bug #296537: Increase the warnings and catch where the user does not have IA32_EMULATION set, by trying to run the binary.
Package-Manager: portage-2.2_rc58/cvs/Linux x86_64
-rw-r--r--sys-boot/grub-static/ChangeLog7
-rw-r--r--sys-boot/grub-static/Manifest4
-rw-r--r--sys-boot/grub-static/grub-static-0.97-r9.ebuild32
3 files changed, 36 insertions, 7 deletions
diff --git a/sys-boot/grub-static/ChangeLog b/sys-boot/grub-static/ChangeLog
index 2222ff80b4a9..7ca3e3c3d9bf 100644
--- a/sys-boot/grub-static/ChangeLog
+++ b/sys-boot/grub-static/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-boot/grub-static
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/ChangeLog,v 1.22 2009/07/04 18:47:53 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/ChangeLog,v 1.23 2009/12/12 18:09:30 robbat2 Exp $
+
+ 12 Dec 2009; Robin H. Johnson <robbat2@gentoo.org>
+ grub-static-0.97-r9.ebuild:
+ Bug #296537: Increase the warnings and catch where the user does not have
+ IA32_EMULATION set, by trying to run the binary.
04 Jul 2009; Robin H. Johnson <robbat2@gentoo.org>
grub-static-0.97-r9.ebuild:
diff --git a/sys-boot/grub-static/Manifest b/sys-boot/grub-static/Manifest
index 02ac37d38ed9..e7ef045fc5b5 100644
--- a/sys-boot/grub-static/Manifest
+++ b/sys-boot/grub-static/Manifest
@@ -4,7 +4,7 @@ DIST grub-static-0.97-r9.tar.bz2 937621 RMD160 d8cab235213050b5731d36097480f9f41
DIST grub-static-0.97.tar.bz2 954051 RMD160 3b4d3951df5ab0255321631dd383803bb2302977 SHA1 aaddbe5f31788cd6e46a0e76219b76ae14ac062a SHA256 468ac48823880bd7cb2dd6bf60673adef1313c44a5e3131a0a4a37d2cc1145bc
EBUILD grub-static-0.96-r1.ebuild 525 RMD160 1db51afc5990529daec430447c1a0f0a1d8bf9b7 SHA1 621aca72148f7a701bea3ced135961c2c29ce5bd SHA256 f7a3c6a239fed5b54b1ea246700576731b016f525e2204c5c2b196bc312780ef
EBUILD grub-static-0.97-r6.ebuild 4450 RMD160 f2f5f385684d9af970d059486ed0e0588246a581 SHA1 be5f23ff595f2f77ea569f0a332122b17caa2a64 SHA256 5b227bdd0b46224e95757f4dd293e7a05e952bffb1f5e9b95786b2ad1600b441
-EBUILD grub-static-0.97-r9.ebuild 4572 RMD160 c7df291d1f0f78d21cc603dbee9048e66f047e79 SHA1 5d8975ca0d01e7246fd7f9358e589e8c51ef5a67 SHA256 f2a2fbd12fd49ff0fd3c43fb73eaa1234098b320b89b40369f0bce42af5c2d86
+EBUILD grub-static-0.97-r9.ebuild 5300 RMD160 599be8b28cf18401d4bd60c5e6717ca5877ce201 SHA1 7ad28686dfb5a68f1c07e3d709b5ce869e2e1b82 SHA256 2a2ddf55103755d291d47ed12cdce5df709290304bd8fb12e82e31be2d5f12cd
EBUILD grub-static-0.97.ebuild 2039 RMD160 4619b70df076072f36622476e35d47988bf884b3 SHA1 6dee6599dde71c33b2c1142b120e966f86e68fc9 SHA256 41704a8a311c69182ff2eabd23ab281324af5b6ad879906c9b2e3332273aaddf
-MISC ChangeLog 3382 RMD160 609efdf2943a817fdcedab37c31386f27cffb433 SHA1 79d19bca75fdc58e13aa8729d878d0ce713575be SHA256 44e33b531f35f6342339d141ceb8bbfb5f05a7f75461c31c1ab770bbc548ba85
+MISC ChangeLog 3593 RMD160 5c2dae6e7942ec89ca7430ff14b938c3f6b88118 SHA1 56d472634f35241556931f1a9f1d836625c7ba1b SHA256 de57b5ebf20a0ed3b89dc9b7a0db3885fddab33981d4b209931c936b9815ee81
MISC metadata.xml 158 RMD160 d823c6f24034325d607a095ce2851034d70fd2f2 SHA1 7e7b3c2aedeb5fa2761c27cf8f56b5240ae9678e SHA256 0df9eb61f6a4e4a3f8fc16386b0204e22e85940533d769d4a0418a4ecec50d90
diff --git a/sys-boot/grub-static/grub-static-0.97-r9.ebuild b/sys-boot/grub-static/grub-static-0.97-r9.ebuild
index ea9a2b3dff93..f2699f7f1f95 100644
--- a/sys-boot/grub-static/grub-static-0.97-r9.ebuild
+++ b/sys-boot/grub-static/grub-static-0.97-r9.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/grub-static-0.97-r9.ebuild,v 1.5 2009/07/04 18:47:53 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/grub-static-0.97-r9.ebuild,v 1.6 2009/12/12 18:09:30 robbat2 Exp $
# XXX: we need to review menu.lst vs grub.conf handling. We've been converting
# all systems to grub.conf (and symlinking menu.lst to grub.conf), but
@@ -25,12 +25,28 @@ PROVIDE="virtual/bootloader"
pkg_setup() {
local arch="$(tc-arch)"
case ${arch} in
- amd64) CONFIG_CHECK='~IA32_EMULATION' check_extra_config ;;
+ amd64)
+ CONFIG_CHECK='~IA32_EMULATION'
+ WARNING_IA32_EMULATION="You will NOT be able to run grub unless you have IA32_EMULATION set!"
+ check_extra_config
+ ;;
esac
}
src_install() {
cp -a "${WORKDIR}"/* "${D}"/
+ run_test_grub "${D}"/sbin/grub && einfo "New grub can run on your system, good!"
+}
+
+run_test_grub() {
+ local grub="$1"
+ local version="$(${grub} \
+ --read-only --no-pager --no-floppy --no-curses \
+ --no-config-file --batch --version)"
+ local error="grub test-run failed"
+ use amd64 && error="${error} Is IA32_EMULATION set?"
+ [ "${version/${PV}}" != "${version}" ] || die "${error}"
+ return 0
}
#
@@ -42,6 +58,8 @@ setup_boot_dir() {
local boot_dir=$1
local dir=${boot_dir}
+ run_test_grub /sbin/grub
+
mkdir -p "${dir}"
[[ ! -L ${dir}/boot ]] && ln -s . "${dir}/boot"
dir="${dir}/grub"
@@ -95,18 +113,24 @@ setup_boot_dir() {
grub_config=${dir}/grub.conf.install
[[ -e ${grub_config} ]] || grub_config=${dir}/grub.conf
if [[ -e ${grub_config} ]] ; then
+ local tmp="${TMPDIR}/${P}-setup_boot_dir-$$"
egrep \
-v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \
- "${grub_config}" | \
+ "${grub_config}" >"${tmp}"
+ # Do NOT fail here, only warn.
/sbin/grub --batch \
--device-map="${dir}"/device.map \
- > /dev/null
+ >/dev/null <"${tmp}"
+ rc=$?
+ [[ $rc -ne 0 ]] && ewarn "Grub failed to run!"
fi
# the grub default commands silently piss themselves if
# the default file does not exist ahead of time
if [[ ! -e ${dir}/default ]] ; then
+ # This may fail, don't worry about it.
grub-set-default --root-directory="${boot_dir}" default
+ :
fi
einfo "Grub has been installed to ${boot_dir} successfully."
}