diff options
| author | fuzzyray <fuzzyray@gentoo.org> | 2006-01-07 04:25:14 +0000 |
|---|---|---|
| committer | fuzzyray <fuzzyray@gentoo.org> | 2006-01-07 04:25:14 +0000 |
| commit | 535613a9720adc96f893439274fc537ec242c860 (patch) | |
| tree | d4bdeb0d563e4c086dad7ee357001ee7cd1c19eb | |
| parent | 1f975edafcc37697b0ad916bfea31386a99b3071 (diff) | |
| download | gentoolkit-535613a9720adc96f893439274fc537ec242c860.tar.gz | |
Fix revdep-rebuild to work correctly with portage-2.1. Bug #118124
svn path=/; revision=271
| -rw-r--r-- | trunk/ChangeLog | 4 | ||||
| -rwxr-xr-x | trunk/src/revdep-rebuild/revdep-rebuild | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/trunk/ChangeLog b/trunk/ChangeLog index 60b3602..729dd0b 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,7 @@ +2006-01-06 Paul Varner <fuzzyray@gentoo.org> + * revdep-rebuild: Fix revdep-rebuild to play nicely with portage-2.1 + (Bug 118124) + 2005-12-28 Paul Varner <fuzzyray@gentoo.org> * revdep-rebuild: Fix to automatically determine how to call find (Bug 111203) diff --git a/trunk/src/revdep-rebuild/revdep-rebuild b/trunk/src/revdep-rebuild/revdep-rebuild index acd02b5..f08a654 100755 --- a/trunk/src/revdep-rebuild/revdep-rebuild +++ b/trunk/src/revdep-rebuild/revdep-rebuild @@ -58,6 +58,9 @@ echo "Configuring search environment for revdep-rebuild" PORTAGE_NICENESS=$(portageq envvar PORTAGE_NICENESS) [ ! -z "$PORTAGE_NICENESS" ] && renice $PORTAGE_NICENESS $$ > /dev/null +PORTAGE_ROOT=$(portageq envvar ROOT) +[ -z "$PORTAGE_ROOT" ] && PORTAGE_ROOT="/" + # Update the incremental variables using /etc/profile.env, /etc/ld.so.conf, # portage, and the environment @@ -275,10 +278,12 @@ then PREVIOUS_SEARCH_DIRS=$(. ${LIST}.0_env; echo "$SEARCH_DIRS") PREVIOUS_SEARCH_DIRS_MASK=$(. ${LIST}.0_env; echo "$SEARCH_DIRS_MASK") PREVIOUS_LD_LIBRARY_MASK=$(. ${LIST}.0_env; echo "$LD_LIBRARY_MASK") + PREVIOUS_PORTAGE_ROOT=$(. ${LIST}.0_env; echo "$PORTAGE_ROOT") PREVIOUS_OPTIONS=$(. ${LIST}.0_env; echo "$CALLED_OPTIONS") if [ "$PREVIOUS_SEARCH_DIRS" != "$SEARCH_DIRS" ] || \ [ "$PREVIOUS_SEARCH_DIRS_MASK" != "$SEARCH_DIRS_MASK" ] || \ [ "$PREVIOUS_LD_LIBRARY_MASK" != "$LD_LIBRARY_MASK" ] || \ + [ "$PREVIOUS_PORTAGE_ROOT" != "$PORTAGE_ROOT" ] || \ [ "$PREVIOUS_OPTIONS" != "$CALLED_OPTIONS" ] then echo @@ -291,6 +296,7 @@ fi echo "SEARCH_DIRS=\"$SEARCH_DIRS\"" > $LIST.0_env echo "SEARCH_DIRS_MASK=\"$SEARCH_DIRS_MASK\"" >> $LIST.0_env echo "LD_LIBRARY_MASK=\"$LD_LIBRARY_MASK\"" >> $LIST.0_env +echo "PORTAGE_ROOT=\"$PORTAGE_ROOT\"" >> $LIST.0_env echo "CALLED_OPTIONS=\"$CALLED_OPTIONS\"" >> $LIST.0_env echo "EMERGE_OPTIONS=\"$EMERGE_OPTIONS\"" >> $LIST.0_env @@ -480,7 +486,7 @@ if $PACKAGE_NAMES ; then # If SLOT is equal to 0, then just see what portage says is latest version if [ "$SLOT" = "0" ] then - emerge --nospinner --pretend --nodeps $PKG | sed -n 's/ //g;s/\[[^]]*\]//gp' + portageq best_visible $PORTAGE_ROOT $PKG continue fi # Otherwise mask the other SLOTTED versions and check for latest @@ -497,7 +503,7 @@ if $PACKAGE_NAMES ; then do echo "=${PKG}-${pkg_version}" >> /etc/portage/package.mask done - emerge --nospinner --pretend --nodeps $PKG | sed -n 's/ //g;s/\[[^]]*\]//gp' + portageq best_visible $PORTAGE_ROOT $PKG if [ -f /etc/portage/package.mask.revdep-rebuild.backup ] then mv -f /etc/portage/package.mask.revdep-rebuild.backup /etc/portage/package.mask @@ -542,7 +548,7 @@ if [ -f $LLIST.5_order ] ; then else RAW_REBUILD_LIST="$(cat $LLIST.4_ebuilds | sed s/^/=/ | tr '\n' ' ')" if [ ! -z "$RAW_REBUILD_LIST" ] ; then - REBUILD_GREP="^\\($( (emerge --nospinner --pretend --oneshot --nodeps $RAW_REBUILD_LIST ; echo $? >$LLIST.5_status ) | sed -n 's/\./\\&/g;s/ //g;s/$/\\/;s/\[[^]]*\]//gp' | tr '\n' '|' | sed 's/|$//'))\$" + REBUILD_GREP="^\\($( (emerge --nospinner --pretend --oneshot --nodeps --quiet $RAW_REBUILD_LIST ; echo $? >$LLIST.5_status ) | sed -n 's/\./\\&/g;s/ //g;s/$/\\/;s/\[[^]]*\]//gp' | tr '\n' '|' | sed 's/|$//'))\$" if [ $(cat $LLIST.5_status) -gt 0 ] ; then echo "" echo -e "${RD}Warning: Failed to resolve package order." @@ -557,7 +563,7 @@ else done ln -f $LLIST.4_ebuilds $LLIST.5_order else - emerge --nospinner --pretend --oneshot --emptytree $RAW_REBUILD_LIST | sed -n 's/ //g;s/^.*\]//p' | grep "$REBUILD_GREP" >$LLIST.5_order + emerge --nospinner --pretend --oneshot --emptytree --quiet $RAW_REBUILD_LIST | sed -n 's/ //g;s/^.*\]//p' | grep "$REBUILD_GREP" >$LLIST.5_order fi else echo -n "" >$LLIST.5_order |
