From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 0F666138A1F for ; Sun, 28 Sep 2014 17:11:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0C182E099D; Sun, 28 Sep 2014 17:11:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6058CE099D for ; Sun, 28 Sep 2014 17:11:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 56CDB340297 for ; Sun, 28 Sep 2014 17:11:51 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A101C13A7 for ; Sun, 28 Sep 2014 17:11:49 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1411924190.2f3cde1d67e04cf01dae8ec8b1f2bf0515c153df.grobian@gentoo> Subject: [gentoo-commits] proj/portage:prefix commit in: man/, bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/misc-functions.sh man/ebuild.5 X-VCS-Directories: man/ bin/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 2f3cde1d67e04cf01dae8ec8b1f2bf0515c153df X-VCS-Branch: prefix Date: Sun, 28 Sep 2014 17:11:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 690697ca-2c59-4fcd-893d-c5394156748c X-Archives-Hash: 219a012a298ee9bdce47065a91a28941 commit: 2f3cde1d67e04cf01dae8ec8b1f2bf0515c153df Author: Fabian Groffen gentoo org> AuthorDate: Sun Sep 28 17:09:50 2014 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sun Sep 28 17:09:50 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2f3cde1d install_qa_check_macho: introduce QA_IGNORE_INSTALL_NAME_FILES Add QA_IGNORE_INSTALL_NAME_FILES containing a list for file to treat as non-fatal when they have failures with install_names. --- bin/misc-functions.sh | 32 +++++++++++++++++++++++++------- man/ebuild.5 | 6 ++++++ 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 9ce9df6..d92103f 100644 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -1084,6 +1084,27 @@ install_qa_check_macho() { install_name=${l%%;*}; l=${l#*;} needed=${l%%;*}; l=${l#*;} + ignore= + qa_var="QA_IGNORE_INSTALL_NAME_FILES_${ARCH/-/_}" + eval "[[ -n \${!qa_var} ]] && + QA_IGNORE_INSTALL_NAME_FILES=(\"\${${qa_var}[@]}\")" + + if [[ ${#QA_IGNORE_INSTALL_NAME_FILES[@]} -gt 1 ]] ; then + for x in "${QA_IGNORE_INSTALL_NAME_FILES[@]}" ; do + [[ ${obj##*/} == ${x} ]] && \ + ignore=true + done + else + local shopts=$- + set -o noglob + for x in ${QA_IGNORE_INSTALL_NAME_FILES} ; do + [[ ${obj##*/} == ${x} ]] && \ + ignore=true + done + set +o noglob + set -${shopts} + fi + # See if the self-reference install_name points to an existing # and to be installed file. This usually is a symlink for the # major version. @@ -1103,23 +1124,20 @@ install_qa_check_macho() { # remember we are in an implicit subshell, that's # why we touch a file here ... ideally we should be # able to die correctly/nicely here - touch "${T}"/.install_name_check_failed + [[ -z ${ignore} && touch "${T}"/.install_name_check_failed fi # this is ugly, paths with spaces won't work for lib in ${needed//,/ } ; do if [[ ${lib} == ${D}* ]] ; then eqawarn "QA Notice: install_name references \${D}: ${lib} in ${obj}" - touch "${T}"/.install_name_check_failed + [[ -z ${ignore} && touch "${T}"/.install_name_check_failed elif [[ ${lib} == ${S}* ]] ; then eqawarn "QA Notice: install_name references \${S}: ${lib} in ${obj}" - touch "${T}"/.install_name_check_failed + [[ -z ${ignore} && touch "${T}"/.install_name_check_failed elif ! install_name_is_relative ${lib} && [[ ! -e ${lib} && ! -e ${D}${lib} ]] ; then eqawarn "QA Notice: invalid reference to ${lib} in ${obj}" - # remember we are in an implicit subshell, that's - # why we touch a file here ... ideally we should be - # able to die correctly/nicely here - touch "${T}"/.install_name_check_failed + [[ -z ${ignore} && touch "${T}"/.install_name_check_failed fi done diff --git a/man/ebuild.5 b/man/ebuild.5 index 89bd6a2..708e9d4 100644 --- a/man/ebuild.5 +++ b/man/ebuild.5 @@ -777,6 +777,12 @@ characters. This variable is intended to be used on files of binary packages which ignore CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, and LDFLAGS variables. .TP +.B QA_IGNORE_INSTALL_NAME_FILES +This should contain a list of file names (without path) that should be +ignored in the install_name check. That is, if these files point to +something not available in the image directory or live filesystem, these +files are ignored, albeit being broken. +.TP .B QA_MULTILIB_PATHS This should contain a list of file paths, relative to the image directory, of files that should be ignored for the multilib\-strict checks.