if ${GS_UPWORLD} ; then
(
- eval $(portageq envvar -v PORTDIR)
- cd "${PORTDIR}"
+ repos=(
+ $(portageq repositories_configuration / | awk '$1 == "location" { $1 = $2 = ""; print }')
+ )
bad_pkgs=()
good_pkgs=()
for p in `qlist -ICS` ; do
- if [[ -d ${p%:*} ]] ; then
+ good=false
+ for repo in ${repos[@]} ; do
+ if [[ -d ${repo}/${p%:*} ]] ; then
+ good=true
+ break
+ fi
+ done
+
+ if ${good} ; then
good_pkgs+=( ${p} )
else
bad_pkgs+=( ${p} )
fi
done
+
if [[ ${#bad_pkgs[@]} -gt 0 ]] ; then
echo 'These packages no longer exist:'
printf '\t%s\n' "${bad_pkgs[@]}"
echo
fi
echo 'emerge -u1qv --keep-going $(awk '\''$2 ~ /\// {print $2}'\'' '${up_log}')'
- emerge ${good_pkgs[*]} -upq --cols
+ emerge -upq --cols \
+ $(printf '%s\n' ${good_pkgs[*]} | grep -v '^cross-')
) >& ${up_log}
fi