public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoolkit r479 - in trunk: . src/revdep-rebuild
@ 2008-03-13 19:34 Paul Varner (fuzzyray)
  0 siblings, 0 replies; only message in thread
From: Paul Varner (fuzzyray) @ 2008-03-13 19:34 UTC (permalink / raw
  To: gentoo-commits

Author: fuzzyray
Date: 2008-03-13 19:34:23 +0000 (Thu, 13 Mar 2008)
New Revision: 479

Modified:
   trunk/ChangeLog
   trunk/src/revdep-rebuild/revdep-rebuild
Log:
Fix trying to emerge an empty list of packages. (Bug 213294)

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-03-05 18:25:54 UTC (rev 478)
+++ trunk/ChangeLog	2008-03-13 19:34:23 UTC (rev 479)
@@ -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)

Modified: trunk/src/revdep-rebuild/revdep-rebuild
===================================================================
--- trunk/src/revdep-rebuild/revdep-rebuild	2008-03-05 18:25:54 UTC (rev 478)
+++ trunk/src/revdep-rebuild/revdep-rebuild	2008-03-13 19:34:23 UTC (rev 479)
@@ -841,18 +841,25 @@
 		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

-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-13 19:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-13 19:34 [gentoo-commits] gentoolkit r479 - in trunk: . src/revdep-rebuild Paul Varner (fuzzyray)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox