summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2015-12-19 15:15:05 +0100
committerUlrich Müller <ulm@gentoo.org>2015-12-21 08:52:26 +0100
commitd5beda4d171865e8f8c4e6e23d7cea110bff40fb (patch)
tree003b2416d29a4a1e4780c03448a2ac98a7ba571f /eclass/readme.gentoo-r1.eclass
parentsys-cluster/ceph: bump to 9.2.0 (diff)
downloadgentoo-d5beda4d171865e8f8c4e6e23d7cea110bff40fb.tar.gz
gentoo-d5beda4d171865e8f8c4e6e23d7cea110bff40fb.tar.bz2
gentoo-d5beda4d171865e8f8c4e6e23d7cea110bff40fb.zip
readme.gentoo-r1.eclass: Do not inherit eutils.
This was only needed in readme.gentoo_create_doc() for a single call of eshopts_{push,pop}. Replace it by saving the set of options in a variable. Die if writing the temp file in readme.gentoo_create_doc() fails.
Diffstat (limited to 'eclass/readme.gentoo-r1.eclass')
-rw-r--r--eclass/readme.gentoo-r1.eclass11
1 files changed, 5 insertions, 6 deletions
diff --git a/eclass/readme.gentoo-r1.eclass b/eclass/readme.gentoo-r1.eclass
index c07665072c2b..07320c0e08bd 100644
--- a/eclass/readme.gentoo-r1.eclass
+++ b/eclass/readme.gentoo-r1.eclass
@@ -21,8 +21,6 @@
if [[ -z ${_README_GENTOO_ECLASS} ]]; then
_README_GENTOO_ECLASS=1
-inherit eutils
-
case "${EAPI:-0}" in
0|1|2|3)
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
@@ -61,15 +59,16 @@ readme.gentoo_create_doc() {
debug-print-function ${FUNCNAME} "${@}"
if [[ -n "${DOC_CONTENTS}" ]]; then
- eshopts_push
- set -f
if [[ -n "${DISABLE_AUTOFORMATTING}" ]]; then
- echo "${DOC_CONTENTS}" > "${T}"/README.gentoo
+ echo "${DOC_CONTENTS}" > "${T}"/README.gentoo || die
else
+ local saved_flags=$-
+ set -f # disable filename expansion in echo arguments
echo -e ${DOC_CONTENTS} | fold -s -w 70 \
| sed 's/[[:space:]]*$//' > "${T}"/README.gentoo
+ assert
+ set +f -${saved_flags}
fi
- eshopts_pop
elif [[ -f "${FILESDIR}/README.gentoo-${SLOT%/*}" ]]; then
cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${T}"/README.gentoo || die
elif [[ -f "${FILESDIR}/README.gentoo${README_GENTOO_SUFFIX}" ]]; then