summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2013-09-08 12:07:24 +0200
committerUlrich Müller <ulm@gentoo.org>2013-09-08 12:07:24 +0200
commit4878c5e34325e563e75a97c0e3a20d12b58a58c6 (patch)
tree52c861ebb21949306ea17f21af074d3f781ad670
parentCleanup list of obsolete eclasses. (diff)
downloadebuild-mode-4878c5e34325e563e75a97c0e3a20d12b58a58c6.tar.gz
ebuild-mode-4878c5e34325e563e75a97c0e3a20d12b58a58c6.tar.bz2
ebuild-mode-4878c5e34325e563e75a97c0e3a20d12b58a58c6.zip
keyword-generation.sh: Sort list of eclasses.
* keyword-generation.sh (ECLASSES): Strip filename suffix and sort the list of eclasses.
-rw-r--r--ChangeLog1
-rw-r--r--keyword-generation.sh10
2 files changed, 6 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 74c6267..a8388bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
2013-09-08 Ulrich Müller <ulm@gentoo.org>
* keyword-generation.sh (OBSOLETE): Cleanup list.
+ (ECLASSES): Strip filename suffix and sort the list of eclasses.
2013-07-07 Ulrich Müller <ulm@gentoo.org>
diff --git a/keyword-generation.sh b/keyword-generation.sh
index 8718e46..373fc69 100644
--- a/keyword-generation.sh
+++ b/keyword-generation.sh
@@ -10,7 +10,7 @@
TMPFILE="$(mktemp ${TMPDIR:-/tmp}/keyword-generation.XXXXXX)"
ECLASSDIR="$(portageq portdir)/eclass"
-ECLASSES=$(cd ${ECLASSDIR}; ls *.eclass)
+ECLASSES=$(cd ${ECLASSDIR}; ls *.eclass | sed 's/\.eclass$//' | LC_ALL=C sort)
# Obsolete eclasses
OBSOLETE="bash-completion gems leechcraft ruby x-modular"
@@ -26,11 +26,11 @@ has() {
echo "Output in ${TMPFILE}"
for eclass in ${ECLASSES}; do
- has ${eclass%.eclass} ${OBSOLETE} && continue
- grep -q "^# @DEAD$" "${ECLASSDIR}/${eclass}" && continue
+ has ${eclass} ${OBSOLETE} && continue
+ file="${ECLASSDIR}/${eclass}.eclass"
+ grep -q "^# @DEAD$" "${file}" && continue
- functions=$(env -i bash -c \
- ". ${ECLASSDIR}/${eclass}; declare -F" 2>/dev/null \
+ functions=$(env -i bash -c ". ${file}; declare -F" 2>/dev/null \
| sed 's/.*[[:space:]]//;/^_/d;s/.*/"&"/')
[[ -z ${functions} ]] && continue