--- revdep-rebuild.orig 2015-05-25 13:56:28.000000000 -0700 +++ revdep-rebuild 2015-05-25 20:54:48.611651901 -0700 @@ -54,6 +54,7 @@ declare ORDER_PKGS # ...sort declare PACKAGE_NAMES # ...emerge by slot, not by versionated atom declare RM_OLD_TEMPFILES # ...remove tempfiles from prior runs declare SEARCH_BROKEN # ...search for broken libraries and binaries +declare UPGRADE_CXX # ...find references to older C++ library functions declare VERBOSE # ...give verbose output # Globals that impact portage directly: @@ -191,6 +192,7 @@ Broken reverse dependency rebuilder. (also passed to emerge command) -P, --no-progress Turn off the progress meter -q, --quiet Be less verbose (also passed to emerge command) + -u, --upgrade-c++ Upgrade packages referencing older C++ library functions -v, --verbose Be more verbose (also passed to emerge command) Calls emerge, options after -- are ignored by $APP_NAME @@ -400,6 +402,8 @@ get_longopts() { # backwards compatibility. warn_deprecated_opt "$1" PACKAGE_NAMES=1;; + --upgrade-c++) unset SEARCH_BROKEN + UPGRADE_CXX=1;; *) die_invalid_option $1;; esac } @@ -408,7 +412,7 @@ get_longopts() { # Get single-letter commandline options preceded by a single dash. get_shortopts() { local OPT OPTSTRING OPTARG OPTIND - while getopts ":CdehikL:loPpqu:vX" OPT; do + while getopts ":CdehikL:loPpquvX" OPT; do case "$OPT" in C) # TODO: Match syntax with the rest of gentoolkit export NOCOLOR="yes";; @@ -429,6 +433,8 @@ get_shortopts() { q) progress() { :; } QUIET=1 EMERGE_OPTIONS+=("--quiet");; + u) unset SEARCH_BROKEN + UPGRADE_CXX=1;; v) VERBOSE=1 EMERGE_OPTIONS+=("--verbose");; X) # No longer used, since it is the default. @@ -794,6 +800,12 @@ main_checks() { fi fi fi + if [[ $UPGRADE_CXX ]]; then + if nm -C "$target_file" 2>/dev/null | grep -q std::basic_string; then + echo "obj $target_file" >> "$BROKEN_FILE" + echo_v " found reference(s) to basic_string in $target_file" + fi + fi elif [[ $SEARCH_BROKEN ]]; then # Look for broken .la files la_SEARCH_DIRS="$(parse_ld_so_conf)"