diff options
| author | fuzzyray <fuzzyray@gentoo.org> | 2008-03-13 19:34:23 +0000 |
|---|---|---|
| committer | fuzzyray <fuzzyray@gentoo.org> | 2008-03-13 19:34:23 +0000 |
| commit | f102a9aeee3b81ae9069ecde5051920f892d7d0a (patch) | |
| tree | ecef0c4728f5704d29193aca484de2b08855e39e | |
| parent | 7082ca9e0eeb97a0ed3b7739956ebd6b035fbb6d (diff) | |
| download | gentoolkit-f102a9aeee3b81ae9069ecde5051920f892d7d0a.tar.gz | |
Fix trying to emerge an empty list of packages. (Bug 213294)
svn path=/; revision=479
| -rw-r--r-- | trunk/ChangeLog | 4 | ||||
| -rwxr-xr-x | trunk/src/revdep-rebuild/revdep-rebuild | 17 |
2 files changed, 16 insertions, 5 deletions
diff --git a/trunk/ChangeLog b/trunk/ChangeLog index 1c94086..3996886 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,7 @@ +2008-03-13: Paul Varner <fuzzyray@gentoo.org> + * revdep-rebuild: Fix trying to emerge an empty list of packages. (Bug + 213294) + 2008-02-28: Paul Varner <fuzzyray@gentoo.org> * gentoolkit: Fix traceback when accessing the portage db. (Bug #211716) 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 |
