Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 213294
Collapse All | Expand All

(-)revdep-rebuild (-5 / +12 lines)
Lines 841-858 Link Here
841
		RAW_REBUILD_LIST=$(<"$LIST.4_ebuilds")
841
		RAW_REBUILD_LIST=$(<"$LIST.4_ebuilds")
842
		if [[ $RAW_REBUILD_LIST ]]; then
842
		if [[ $RAW_REBUILD_LIST ]]; then
843
			export EMERGE_DEFAULT_OPTS="--nospinner --pretend --oneshot --quiet"
843
			export EMERGE_DEFAULT_OPTS="--nospinner --pretend --oneshot --quiet"
844
			RAW_REBUILD_LIST=($RAW_REBUILD_LIST)
844
			RAW_REBUILD_LIST=($RAW_REBUILD_LIST) # convert into array
845
			# If PACKAGE_NAMES is defined we're using slots, not versions
845
			# If PACKAGE_NAMES is defined we're using slots, not versions
846
			if [[ $PACKAGE_NAMES ]]; then
846
			if [[ $PACKAGE_NAMES ]]; then
847
				# Eliminate atoms that can't be built
847
				# Eliminate atoms that can't be built
848
				for (( i=0; i<${#RAW_REBUILD_LIST[@]}; i++ )); do
848
				for i in "${!RAW_REBUILD_LIST[@]}"; do
849
					portageq best_visible "$PORTAGE_ROOT" "${RAW_REBUILD_LIST[i]}" >/dev/null && continue
849
					if [[ "${RAW_REBUILD_LIST[i]}" = *[A-Za-z]* ]]; then
850
					SKIP_LIST+=("${RAW_REBUILD_LIST[i]}")
850
						portageq best_visible "$PORTAGE_ROOT" "${RAW_REBUILD_LIST[i]}" >/dev/null && continue
851
						SKIP_LIST+=("${RAW_REBUILD_LIST[i]}")
852
					fi
851
					unset RAW_REBUILD_LIST[i]
853
					unset RAW_REBUILD_LIST[i]
852
				done
854
				done
853
				# If RAW_REBUILD_LIST is empty, then we have nothing to build.
855
				# If RAW_REBUILD_LIST is empty, then we have nothing to build.
854
				if (( ${#RAW_REBUILD_LIST[@]} == 0 )); then
856
				if (( ${#RAW_REBUILD_LIST[@]} == 0 )); then
855
					list_skipped_packages
857
					if (( ${#SKIP_LIST[@]} == 0 )); then
858
						ewarn "The list of packages to skip is empty, but there are no"
859
						ewarn "packages listed to rebuild either. This is a bug."
860
					else
861
						list_skipped_packages
862
					fi
856
					die 1 'Warning: Portage cannot rebuild any of the necessary packages.'
863
					die 1 'Warning: Portage cannot rebuild any of the necessary packages.'
857
				fi
864
				fi
858
			else
865
			else

Return to bug 213294