From: Zac Medico Date: Sat, 21 Aug 2010 13:24:50 +0000 (-0700) Subject: Add support for a QA_PREBUILT variable should contain a list of X-Git-Tag: v2.2_rc68~40 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=47dbb75626df75439209981d9aa8bdbdce375b35;p=portage.git Add support for a QA_PREBUILT variable should contain a list of pre-built binaries. Paths listed here will be appended to each of the other QA_* variables. Thanks to Diego Pettenò for the suggestion. --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index de3c80bef..2fbd612bd 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1995,6 +1995,26 @@ if ! hasq "$EBUILD_PHASE" clean cleanrm ; then fi fi + if [[ -n $QA_PREBUILT ]] ; then + + # these ones support fnmatch patterns + QA_EXECSTAC+=" $QA_PREBUILT" + QA_TEXTRELS+=" $QA_PREBUILT" + QA_WX_LOAD+=" $QA_PREBUILT" + + # these ones support regular expressions, so translate + # fnmatch patterns to regular expressions + for x in QA_DT_HASH QA_DT_NEEDED QA_PRESTRIPPED QA_SONAME ; do + if [[ $(declare -p $x 2>/dev/null) = declare\ -a* ]] ; then + eval "$x=(\${$x[@]} ${QA_PREBUILT//\*/.*})" + else + eval "$x+=\" ${QA_PREBUILT//\*/.*}\"" + fi + done + + unset x + fi + # This needs to be exported since prepstrip is a separate shell script. [[ -n $QA_PRESTRIPPED ]] && export QA_PRESTRIPPED eval "[[ -n \$QA_PRESTRIPPED_${ARCH/-/_} ]] && export QA_PRESTRIPPED_${ARCH/-/_}" diff --git a/man/ebuild.5 b/man/ebuild.5 index 8fa32e23f..d9d394309 100644 --- a/man/ebuild.5 +++ b/man/ebuild.5 @@ -496,6 +496,16 @@ binary objects that cannot be altered. .br Note that objects that violate these rules may fail on some architectures. .TP +\fBQA_PREBUILT\fR +This should contain a list of file paths, relative to the image +directory, of files that are pre\-built binaries. Paths +listed here will be appended to each of the QA_* variables +listed below. The paths may contain fnmatch\-like patterns +which will be internally translated to regular expressions for +the QA_* variables that support regular expressions instead +of fnmatch patterns. The translation mechanism simply replaces +'*' with '.*'. +.TP \fBQA_TEXTRELS\fR This variable can be set to a list of file paths, relative to the image directory, of files that contain text relocations that cannot be eliminated.