Lines 1-7
Link Here
|
1 |
#!/bin/bash |
1 |
#!/bin/bash |
2 |
# Copyright 1999-2010 Gentoo Foundation |
2 |
# Copyright 1999-2017 Gentoo Foundation |
3 |
|
3 |
|
4 |
# revdep-rebuild: Reverse dependency rebuilder. |
4 |
# revdep-rebuild.sh: Reverse dependency rebuilder. |
5 |
# Original Author: Stanislav Brabec |
5 |
# Original Author: Stanislav Brabec |
6 |
# Rewrite Author: Michael A. Smith |
6 |
# Rewrite Author: Michael A. Smith |
7 |
# Current Maintainer: Paul Varner <fuzzyray@gentoo.org> |
7 |
# Current Maintainer: Paul Varner <fuzzyray@gentoo.org> |
Lines 17-23
Link Here
|
17 |
unset GREP_OPTIONS |
17 |
unset GREP_OPTIONS |
18 |
|
18 |
|
19 |
# Readonly variables: |
19 |
# Readonly variables: |
20 |
declare -r APP_NAME="revdep-rebuild" # # The name of this application |
20 |
declare -r APP_NAME="revdep-rebuild.sh" # # The name of this application |
21 |
declare -r VERSION="git" |
21 |
declare -r VERSION="git" |
22 |
declare -r OIFS="$IFS" # Save the IFS |
22 |
declare -r OIFS="$IFS" # Save the IFS |
23 |
declare -r ENV_FILE=0_env.rr # Contains environment variables |
23 |
declare -r ENV_FILE=0_env.rr # Contains environment variables |
Lines 62-76
Link Here
|
62 |
declare EMERGE_OPTIONS # Array of options to pass to portage |
62 |
declare EMERGE_OPTIONS # Array of options to pass to portage |
63 |
declare PORTAGE_NICENESS # Renice to this value |
63 |
declare PORTAGE_NICENESS # Renice to this value |
64 |
declare PORTAGE_ROOT # The root path for portage |
64 |
declare PORTAGE_ROOT # The root path for portage |
65 |
declare REVDEP_REBUILD_DEFAULT_OPTS # String of default emerge options for revdep-rebuild |
65 |
declare REVDEP_REBUILD_DEFAULT_OPTS # String of default emerge options for revdep-rebuild.sh |
66 |
|
66 |
|
67 |
# Customizable incremental variables: |
67 |
# Customizable incremental variables: |
68 |
# These variables can be prepended to either by setting the variable in |
68 |
# These variables can be prepended to either by setting the variable in |
69 |
# your environment prior to execution, or by placing an entry in |
69 |
# your environment prior to execution, or by placing an entry in |
70 |
# /etc/make.conf. |
70 |
# /etc/portage/make.conf. |
71 |
# |
71 |
# |
72 |
# An entry of "-*" means to clear the variable from that point forward. |
72 |
# An entry of "-*" means to clear the variable from that point forward. |
73 |
# Example: env SEARCH_DIRS="/usr/bin -*" revdep-rebuild will set SEARCH_DIRS |
73 |
# Example: env SEARCH_DIRS="/usr/bin -*" revdep-rebuild.sh will set SEARCH_DIRS |
74 |
# to contain only /usr/bin |
74 |
# to contain only /usr/bin |
75 |
declare LD_LIBRARY_MASK # Mask of specially evaluated libraries |
75 |
declare LD_LIBRARY_MASK # Mask of specially evaluated libraries |
76 |
declare SEARCH_DIRS # List of dirs to search for executables and libraries |
76 |
declare SEARCH_DIRS # List of dirs to search for executables and libraries |
Lines 336-342
Link Here
|
336 |
echo "Encountered unrecognized option $1." >&2 |
336 |
echo "Encountered unrecognized option $1." >&2 |
337 |
echo |
337 |
echo |
338 |
echo "$APP_NAME no longer automatically passes unrecognized options to portage." |
338 |
echo "$APP_NAME no longer automatically passes unrecognized options to portage." |
339 |
echo "Separate emerge-only options from revdep-rebuild options with the -- flag." |
339 |
echo "Separate emerge-only options from revdep-rebuild.sh options with the -- flag." |
340 |
echo |
340 |
echo |
341 |
echo "For example, $APP_NAME -v -- --ask" |
341 |
echo "For example, $APP_NAME -v -- --ask" |
342 |
echo |
342 |
echo |
Lines 1072-1078
Link Here
|
1072 |
fi |
1072 |
fi |
1073 |
} |
1073 |
} |
1074 |
|
1074 |
|
1075 |
# Get multiple portage variables at once to speedup revdep-rebuild. |
1075 |
# Get multiple portage variables at once to speedup revdep-rebuild.sh. |
1076 |
portage_settings() { |
1076 |
portage_settings() { |
1077 |
local ORIG_SEARCH_DIRS="$SEARCH_DIRS" |
1077 |
local ORIG_SEARCH_DIRS="$SEARCH_DIRS" |
1078 |
local ORIG_SEARCH_DIRS_MASK="$SEARCH_DIRS_MASK" |
1078 |
local ORIG_SEARCH_DIRS_MASK="$SEARCH_DIRS_MASK" |
Lines 1126-1132
Link Here
|
1126 |
|
1126 |
|
1127 |
# Read the incremental variables from environment and portage |
1127 |
# Read the incremental variables from environment and portage |
1128 |
# Until such time as portage supports these variables as incrementals |
1128 |
# Until such time as portage supports these variables as incrementals |
1129 |
# The value will be what is in /etc/make.conf |
1129 |
# The value will be what is in /etc/portage/make.conf |
1130 |
# SEARCH_DIRS+=" "$(unset SEARCH_DIRS; portageq envvar SEARCH_DIRS) |
1130 |
# SEARCH_DIRS+=" "$(unset SEARCH_DIRS; portageq envvar SEARCH_DIRS) |
1131 |
# SEARCH_DIRS_MASK+=" "$(unset SEARCH_DIRS_MASK; portageq envvar SEARCH_DIRS_MASK) |
1131 |
# SEARCH_DIRS_MASK+=" "$(unset SEARCH_DIRS_MASK; portageq envvar SEARCH_DIRS_MASK) |
1132 |
# LD_LIBRARY_MASK+=" "$(unset LD_LIBRARY_MASK; portageq envvar LD_LIBRARY_MASK) |
1132 |
# LD_LIBRARY_MASK+=" "$(unset LD_LIBRARY_MASK; portageq envvar LD_LIBRARY_MASK) |
Lines 1233-1239
Link Here
|
1233 |
trap trap_cmd SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM |
1233 |
trap trap_cmd SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM |
1234 |
einfo 'Build finished correctly. Removing temporary files...' |
1234 |
einfo 'Build finished correctly. Removing temporary files...' |
1235 |
einfo |
1235 |
einfo |
1236 |
einfo 'You can re-run revdep-rebuild to verify that all libraries and binaries' |
1236 |
einfo 'You can re-run revdep-rebuild.sh to verify that all libraries and binaries' |
1237 |
einfo 'are fixed. Possible reasons for remaining inconsistencies include:' |
1237 |
einfo 'are fixed. Possible reasons for remaining inconsistencies include:' |
1238 |
einfo ' orphaned files' |
1238 |
einfo ' orphaned files' |
1239 |
einfo ' deep dependencies' |
1239 |
einfo ' deep dependencies' |
Lines 1245-1251
Link Here
|
1245 |
[[ $KEEP_TEMP ]] || rm -f "${FILES[@]}" |
1245 |
[[ $KEEP_TEMP ]] || rm -f "${FILES[@]}" |
1246 |
fi |
1246 |
fi |
1247 |
else |
1247 |
else |
1248 |
einfo 'Now you can remove -p (or --pretend) from arguments and re-run revdep-rebuild.' |
1248 |
einfo 'Now you can remove -p (or --pretend) from arguments and re-run revdep-rebuild.sh.' |
1249 |
fi |
1249 |
fi |
1250 |
} |
1250 |
} |
1251 |
|
1251 |
|