summaryrefslogtreecommitdiff
path: root/trunk/src
diff options
context:
space:
mode:
authorfuzzyray <fuzzyray@gentoo.org>2008-03-13 19:34:23 +0000
committerfuzzyray <fuzzyray@gentoo.org>2008-03-13 19:34:23 +0000
commitf102a9aeee3b81ae9069ecde5051920f892d7d0a (patch)
treeecef0c4728f5704d29193aca484de2b08855e39e /trunk/src
parent7082ca9e0eeb97a0ed3b7739956ebd6b035fbb6d (diff)
downloadgentoolkit-f102a9aeee3b81ae9069ecde5051920f892d7d0a.tar.gz
Fix trying to emerge an empty list of packages. (Bug 213294)
svn path=/; revision=479
Diffstat (limited to 'trunk/src')
-rwxr-xr-xtrunk/src/revdep-rebuild/revdep-rebuild17
1 files changed, 12 insertions, 5 deletions
diff --git a/trunk/src/revdep-rebuild/revdep-rebuild b/trunk/src/revdep-rebuild/revdep-rebuild
index 8c65e26..282dee5 100755
--- a/trunk/src/revdep-rebuild/revdep-rebuild
+++ b/trunk/src/revdep-rebuild/revdep-rebuild
@@ -841,18 +841,25 @@ get_build_order() {
RAW_REBUILD_LIST=$(<"$LIST.4_ebuilds")
if [[ $RAW_REBUILD_LIST ]]; then
export EMERGE_DEFAULT_OPTS="--nospinner --pretend --oneshot --quiet"
- RAW_REBUILD_LIST=($RAW_REBUILD_LIST)
+ RAW_REBUILD_LIST=($RAW_REBUILD_LIST) # convert into array
# If PACKAGE_NAMES is defined we're using slots, not versions
if [[ $PACKAGE_NAMES ]]; then
# Eliminate atoms that can't be built
- for (( i=0; i<${#RAW_REBUILD_LIST[@]}; i++ )); do
- portageq best_visible "$PORTAGE_ROOT" "${RAW_REBUILD_LIST[i]}" >/dev/null && continue
- SKIP_LIST+=("${RAW_REBUILD_LIST[i]}")
+ for i in "${!RAW_REBUILD_LIST[@]}"; do
+ if [[ "${RAW_REBUILD_LIST[i]}" = *[A-Za-z]* ]]; then
+ portageq best_visible "$PORTAGE_ROOT" "${RAW_REBUILD_LIST[i]}" >/dev/null && continue
+ SKIP_LIST+=("${RAW_REBUILD_LIST[i]}")
+ fi
unset RAW_REBUILD_LIST[i]
done
# If RAW_REBUILD_LIST is empty, then we have nothing to build.
if (( ${#RAW_REBUILD_LIST[@]} == 0 )); then
- list_skipped_packages
+ if (( ${#SKIP_LIST[@]} == 0 )); then
+ ewarn "The list of packages to skip is empty, but there are no"
+ ewarn "packages listed to rebuild either. This is a bug."
+ else
+ list_skipped_packages
+ fi
die 1 'Warning: Portage cannot rebuild any of the necessary packages.'
fi
else