Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] Support QA{,_STRICT}_INSTALL_PATHS variables (bug 667378)
Date: Mon, 01 Oct 2018 07:34:52
Message-Id: 1538379278.3444.1.camel@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] Support QA{,_STRICT}_INSTALL_PATHS variables (bug 667378) by Zac Medico
1 On Sun, 2018-09-30 at 22:45 -0700, Zac Medico wrote:
2 > The QA_INSTALL_PATHS variable exempts paths from "unexpected paths"
3 > warnings generated by install-qa-check.d/08gentoo-paths. This is
4 > useful for QT packages that are expected to install a directory
5 > named /usr/share/doc/${PN}-${VERSION} (which may differ from the
6 > usual /usr/share/doc/${PF} location as reported in bug 667280).
7 >
8 > Bug: https://bugs.gentoo.org/667378
9 > Signed-off-by: Zac Medico <zmedico@g.o>
10 > ---
11 > bin/install-qa-check.d/08gentoo-paths | 21 +++++++++++++++++++++
12 > man/ebuild.5 | 7 +++++++
13 > man/make.conf.5 | 4 ++++
14 > 3 files changed, 32 insertions(+)
15 >
16 > diff --git a/bin/install-qa-check.d/08gentoo-paths b/bin/install-qa-check.d/08gentoo-paths
17 > index 3ee887df0..a00f9f6af 100644
18 > --- a/bin/install-qa-check.d/08gentoo-paths
19 > +++ b/bin/install-qa-check.d/08gentoo-paths
20 > @@ -60,6 +60,27 @@ gentoo_path_check() {
21 >
22 > ${shopt_save}
23 >
24 > + if [[ ${#bad_paths[@]} -gt 0 && ${QA_INSTALL_PATHS} &&
25 > + ${QA_STRICT_INSTALL_PATHS-unset} == unset ]]; then
26 > + local filtered_paths=()
27 > + local sed_args=()
28 > + local qa_install_paths
29 > + if [[ $(declare -p QA_INSTALL_PATHS) == "declare -a "* ]]; then
30 > + qa_install_paths=("${QA_INSTALL_PATHS[@]}")
31 > + else
32 > + set -f
33 > + qa_install_paths=(${QA_INSTALL_PATHS})
34 > + set +f
35 > + fi
36 > + for x in "${qa_install_paths[@]}"; do
37 > + sed_args+=(-e "s#^/${x#/}\$##")
38 > + done
39 > + while read -r -d ''; do
40 > + [[ ${REPLY} ]] && filtered_paths+=("${REPLY}")
41 > + done < <(printf -- '%s\0' "${bad_paths[@]}" | sed -z "${sed_args[@]}")
42 > + bad_paths=("${filtered_paths[@]}")
43 > + fi
44 > +
45 > # report
46 > # ------
47 > if [[ -n ${bad_paths[@]} ]]; then
48 > diff --git a/man/ebuild.5 b/man/ebuild.5
49 > index 9f491dd73..01f3e09aa 100644
50 > --- a/man/ebuild.5
51 > +++ b/man/ebuild.5
52 > @@ -791,6 +791,13 @@ characters.
53 > This variable is intended to be used on files of binary packages which ignore
54 > CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, and LDFLAGS variables.
55 > .TP
56 > +.B QA_INSTALL_PATHS
57 > +This should contain a list of file paths (may be an array), relative to the
58 > +image directory, of files that are exempt from QA notices regarding ebuilds
59 > +that install files to unusual locations.
60 > +The paths may contain regular expressions with escape\-quoted special
61 > +characters.
62 > +.TP
63 > .B QA_MULTILIB_PATHS
64 > This should contain a list of file paths, relative to the image directory, of
65 > files that should be ignored for the multilib\-strict checks.
66 > diff --git a/man/make.conf.5 b/man/make.conf.5
67 > index a33929143..d97d83767 100644
68 > --- a/man/make.conf.5
69 > +++ b/man/make.conf.5
70 > @@ -1060,6 +1060,10 @@ settings from ebuilds. See also \fBebuild\fR(5).
71 > Set this to cause portage to ignore any \fIQA_FLAGS_IGNORED\fR override
72 > settings from ebuilds. See also \fBebuild\fR(5).
73 > .TP
74 > +\fBQA_STRICT_INSTALL_PATHS = \fI"set"\fR
75 > +Set this to cause portage to ignore any \fIQA_INSTALL_PATHS\fR override
76 > +settings from ebuilds. See also \fBebuild\fR(5).
77 > +.TP
78 > \fBQA_STRICT_MULTILIB_PATHS = \fI"set"\fR
79 > Set this to cause portage to ignore any \fIQA_MULTILIB_PATHS\fR override
80 > settings from ebuilds. See also \fBebuild\fR(5).
81
82 QA NAK on this. The purpose of QA checks is not for ebuilds to
83 officially override them because histerical raisins.
84
85 --
86 Best regards,
87 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature