summaryrefslogtreecommitdiff
path: root/trunk
diff options
context:
space:
mode:
authorfuzzyray <fuzzyray@gentoo.org>2006-09-17 23:22:16 +0000
committerfuzzyray <fuzzyray@gentoo.org>2006-09-17 23:22:16 +0000
commitb4a7bb02833e30a95ef95a6f7520989888d9534f (patch)
treeec240de9a29884dafb16d6d8b71495e8035c54bf /trunk
parentbefa8cdd285fe2b6319efab8f2b3c36dce8444b0 (diff)
downloadgentoolkit-b4a7bb02833e30a95ef95a6f7520989888d9534f.tar.gz
Fix bug in Slotting logic when using --package-names
svn path=/; revision=317
Diffstat (limited to 'trunk')
-rwxr-xr-xtrunk/src/revdep-rebuild/revdep-rebuild5
1 files changed, 3 insertions, 2 deletions
diff --git a/trunk/src/revdep-rebuild/revdep-rebuild b/trunk/src/revdep-rebuild/revdep-rebuild
index 7548525..d633c3f 100755
--- a/trunk/src/revdep-rebuild/revdep-rebuild
+++ b/trunk/src/revdep-rebuild/revdep-rebuild
@@ -548,15 +548,15 @@ if $PACKAGE_NAMES ; then
# Get the slot
PKG="$(echo $EXACT_PKG | sed 's/-r[0-9].*$//;s/\(^.*\/*\)-.*$/\1/')"
SLOT=$(cat /var/db/pkg/${EXACT_PKG}/SLOT)
+ OTHER_VERSIONS=$(/usr/lib/gentoolkit/bin/find_pkgs.py $PKG | grep -v "($SLOT)" | awk '{print $2}')
# If SLOT is equal to 0, then just see what portage says is latest version
- if [ "$SLOT" = "0" ]
+ if [ "$SLOT" = "0" -o "x$OTHER_VERSIONS" = "x" ]
then
best_visible=$(portageq best_visible $PORTAGE_ROOT $PKG)
[ "x" != "x$best_visible" ] && echo $best_visible
continue
fi
# Otherwise mask the other SLOTTED versions and check for latest
- OTHER_VERSIONS=$(/usr/lib/gentoolkit/bin/find_pkgs.py $PKG | grep -v "($SLOT)" | awk '{print $2}')
if [ -f /etc/portage/package.mask ]
then
mv -f /etc/portage/package.mask /etc/portage/package.mask.revdep-rebuild.backup
@@ -610,6 +610,7 @@ echo -n -e "${GR}Evaluating package order...${NO}"
if [ -f $LLIST.5_order ] ; then
echo " using existing $LLIST.5_order."
else
+ set_trap "$LLIST.5_order"
RAW_REBUILD_LIST="$(cat $LLIST.4_ebuilds | sed s/^/=/ | tr '\n' ' ')"
if [ ! -z "$RAW_REBUILD_LIST" ] ; then
REBUILD_GREP="^\\($( (EMERGE_DEFAULT_OPTS="" emerge --nospinner --pretend --oneshot --nodeps --quiet $RAW_REBUILD_LIST ; echo $? >$LLIST.5a_status ) | sed -n 's/\./\\&/g;s/ //g;s/$/\\/;s/\[[^]]*\]//gp' | tr '\n' '|' | sed 's/|$//'))\$"