diff options
-rwxr-xr-x | bin/revdep-rebuild.sh | 12 | ||||
-rw-r--r-- | man/revdep-rebuild.1 | 4 |
2 files changed, 15 insertions, 1 deletions
diff --git a/bin/revdep-rebuild.sh b/bin/revdep-rebuild.sh index 75c5767..6b32ae4 100755 --- a/bin/revdep-rebuild.sh +++ b/bin/revdep-rebuild.sh @@ -61,6 +61,7 @@ declare EMERGE_DEFAULT_OPTS # String of options portage assumes to be set declare EMERGE_OPTIONS # Array of options to pass to portage declare PORTAGE_NICENESS # Renice to this value declare PORTAGE_ROOT # The root path for portage +declare REVDEP_DEFAULT_OPTS # String of default emerge options for revdep-rebuild # Customizable incremental variables: # These variables can be prepended to either by setting the variable in @@ -441,6 +442,12 @@ get_opts() { SONAME="not found" SEARCH_BROKEN=1 FULL_LD_PATH=1 + + # Add the revdep-rebuild default options + if [[ -n ${REVDEP_DEFAULT_OPTS} ]]; then + EMERGE_OPTIONS+=("$REVDEP_DEFAULT_OPTS") + fi + while [[ $1 ]]; do case $1 in --) shift @@ -1032,16 +1039,19 @@ portage_settings() { local ORIG_SEARCH_DIRS="$SEARCH_DIRS" local ORIG_SEARCH_DIRS_MASK="$SEARCH_DIRS_MASK" local ORIG_LD_LIBRARY_MASK="$LD_LIBRARY_MASK" + local ORIG_REVDEP_DEFAULT_OPTS="$REVDEP_DEFAULT_OPTS" unset SEARCH_DIRS unset SEARCH_DIRS_MASK unset LD_LIBRARY_MASK + unset REVDEP_DEFAULT_OPTS - eval $(portageq envvar -v PORTAGE_ROOT PORTAGE_NICENESS EMERGE_DEFAULT_OPTS NOCOLOR SEARCH_DIRS SEARCH_DIRS_MASK LD_LIBRARY_MASK) + eval $(portageq envvar -v PORTAGE_ROOT PORTAGE_NICENESS EMERGE_DEFAULT_OPTS NOCOLOR SEARCH_DIRS SEARCH_DIRS_MASK LD_LIBRARY_MASK REVDEP_DEFAULT_OPTS) export NOCOLOR SEARCH_DIRS="$ORIG_SEARCH_DIRS $SEARCH_DIRS" SEARCH_DIRS_MASK="$ORIG_SEARCH_DIRS_MASK $SEARCH_DIRS_MASK" LD_LIBRARY_MASK="$ORIG_LD_LIBRARY_MASK $LD_LIBRARY_MASK" + REVDEP_DEFAULT_OPTS="$ORIG_REVDEP_DEFAULT_OPTS $REVDEP_DEFAULT_OPTS" } ## diff --git a/man/revdep-rebuild.1 b/man/revdep-rebuild.1 index 98aa560..70cead1 100644 --- a/man/revdep-rebuild.1 +++ b/man/revdep-rebuild.1 @@ -72,6 +72,10 @@ While a user can edit and modify the files in the /etc/revdep\-rebuild directory An entry of "\-*" means to clear the variable from that point forward. Example: SEARCH_DIRS="/usr/bin \-*" will set SEARCH_DIRS to contain only /usr/bin +REVDEP_DEFAULT_OPTS \- List of default emerge options for revdep-rebuild + +The REVDEP_DEFAULT_OPTS variable can be used to override EMERGE_DEFAULT_OPTIONS and to default emerge options to revdep\-rebuild. This variable is appended to the values of EMERGE_DEFAULT_OPTIONS and can still be overridden by command line options. Please note that this variable is only for options to pass to emerge and not options for revdep\-rebuild itself. + revdep\-rebuild honors the NOCOLOR and PORTAGE_NICENESS variables from /etc/make.conf .SH "EXAMPLES" It is recommended that when running revdep\-rebuild that the following command be used initially: |