Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:prefix commit in: man/, bin/
Date: Sun, 28 Sep 2014 17:11:55
Message-Id: 1411924190.2f3cde1d67e04cf01dae8ec8b1f2bf0515c153df.grobian@gentoo
1 commit: 2f3cde1d67e04cf01dae8ec8b1f2bf0515c153df
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 28 17:09:50 2014 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 28 17:09:50 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2f3cde1d
7
8 install_qa_check_macho: introduce QA_IGNORE_INSTALL_NAME_FILES
9
10 Add QA_IGNORE_INSTALL_NAME_FILES containing a list for file to treat as
11 non-fatal when they have failures with install_names.
12
13 ---
14 bin/misc-functions.sh | 32 +++++++++++++++++++++++++-------
15 man/ebuild.5 | 6 ++++++
16 2 files changed, 31 insertions(+), 7 deletions(-)
17
18 diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
19 index 9ce9df6..d92103f 100644
20 --- a/bin/misc-functions.sh
21 +++ b/bin/misc-functions.sh
22 @@ -1084,6 +1084,27 @@ install_qa_check_macho() {
23 install_name=${l%%;*}; l=${l#*;}
24 needed=${l%%;*}; l=${l#*;}
25
26 + ignore=
27 + qa_var="QA_IGNORE_INSTALL_NAME_FILES_${ARCH/-/_}"
28 + eval "[[ -n \${!qa_var} ]] &&
29 + QA_IGNORE_INSTALL_NAME_FILES=(\"\${${qa_var}[@]}\")"
30 +
31 + if [[ ${#QA_IGNORE_INSTALL_NAME_FILES[@]} -gt 1 ]] ; then
32 + for x in "${QA_IGNORE_INSTALL_NAME_FILES[@]}" ; do
33 + [[ ${obj##*/} == ${x} ]] && \
34 + ignore=true
35 + done
36 + else
37 + local shopts=$-
38 + set -o noglob
39 + for x in ${QA_IGNORE_INSTALL_NAME_FILES} ; do
40 + [[ ${obj##*/} == ${x} ]] && \
41 + ignore=true
42 + done
43 + set +o noglob
44 + set -${shopts}
45 + fi
46 +
47 # See if the self-reference install_name points to an existing
48 # and to be installed file. This usually is a symlink for the
49 # major version.
50 @@ -1103,23 +1124,20 @@ install_qa_check_macho() {
51 # remember we are in an implicit subshell, that's
52 # why we touch a file here ... ideally we should be
53 # able to die correctly/nicely here
54 - touch "${T}"/.install_name_check_failed
55 + [[ -z ${ignore} && touch "${T}"/.install_name_check_failed
56 fi
57
58 # this is ugly, paths with spaces won't work
59 for lib in ${needed//,/ } ; do
60 if [[ ${lib} == ${D}* ]] ; then
61 eqawarn "QA Notice: install_name references \${D}: ${lib} in ${obj}"
62 - touch "${T}"/.install_name_check_failed
63 + [[ -z ${ignore} && touch "${T}"/.install_name_check_failed
64 elif [[ ${lib} == ${S}* ]] ; then
65 eqawarn "QA Notice: install_name references \${S}: ${lib} in ${obj}"
66 - touch "${T}"/.install_name_check_failed
67 + [[ -z ${ignore} && touch "${T}"/.install_name_check_failed
68 elif ! install_name_is_relative ${lib} && [[ ! -e ${lib} && ! -e ${D}${lib} ]] ; then
69 eqawarn "QA Notice: invalid reference to ${lib} in ${obj}"
70 - # remember we are in an implicit subshell, that's
71 - # why we touch a file here ... ideally we should be
72 - # able to die correctly/nicely here
73 - touch "${T}"/.install_name_check_failed
74 + [[ -z ${ignore} && touch "${T}"/.install_name_check_failed
75 fi
76 done
77
78
79 diff --git a/man/ebuild.5 b/man/ebuild.5
80 index 89bd6a2..708e9d4 100644
81 --- a/man/ebuild.5
82 +++ b/man/ebuild.5
83 @@ -777,6 +777,12 @@ characters.
84 This variable is intended to be used on files of binary packages which ignore
85 CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, and LDFLAGS variables.
86 .TP
87 +.B QA_IGNORE_INSTALL_NAME_FILES
88 +This should contain a list of file names (without path) that should be
89 +ignored in the install_name check. That is, if these files point to
90 +something not available in the image directory or live filesystem, these
91 +files are ignored, albeit being broken.
92 +.TP
93 .B QA_MULTILIB_PATHS
94 This should contain a list of file paths, relative to the image directory, of
95 files that should be ignored for the multilib\-strict checks.