Remove unused environment variables before calling emerge. Bug #142074
authorfuzzyray <fuzzyray@gentoo.org>
Sun, 3 Sep 2006 22:23:15 +0000 (22:23 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Sun, 3 Sep 2006 22:23:15 +0000 (22:23 -0000)
svn path=/; revision=314

trunk/src/revdep-rebuild/revdep-rebuild

index 9093b400c9764f83a606c82092e45bf434ad132c..7548525d935cb8b4d24a095778b164badf8d3712 100755 (executable)
@@ -333,6 +333,10 @@ then
        fi
 fi
 
+# Clean up no longer needed environment variables
+unset PREVIOUS_SEARCH_DIRS PREVIOUS_SEARCH_DIRS_MASK PREVIOUS_LD_LIBRARY_MASK PREVIOUS_PORTAGE_ROOT PREVIOUS_OPTIONS
+unset PRELIMINARY_SEARCH_DIRS PRELIMINARY_SEARCH_DIRS_MASK PRELIMINARY_LD_LIBRARY_MASK PRELIMINARY_CALLED_OPTIONS
+
 # Log our environment
 echo "SEARCH_DIRS=\"$SEARCH_DIRS\"" > $LIST.0_env
 echo "SEARCH_DIRS_MASK=\"$SEARCH_DIRS_MASK\"" >> $LIST.0_env
@@ -646,6 +650,9 @@ else
        echo -e " done.\n  ($LLIST.5_order)"
 fi
 
+# Clean up no longer needed environment variables
+unset COMPLETE_LD_LIBRARY_PATH SEARCH_DIRS SEARCH_DIRS_MASK LD_LIBRARY_MASK PORTAGE_ROOT CALLED_OPTIONS
+
 REBUILD_LIST="$(cat $LLIST.5_order | sed s/^/=/ | tr '\n' ' ')"
 
 trap - SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM