1 |
Dnia 2014-11-22, o godz. 19:24:06 |
2 |
Zac Medico <zmedico@g.o> napisał(a): |
3 |
|
4 |
> > + # Collect the paths for QA checks, highest prio first. |
5 |
> > + paths=( |
6 |
> > + # sysadmin overrides |
7 |
> > + "${EPREFIX}"/usr/local/lib/install-qa-check.d |
8 |
> > + # system-wide package installs |
9 |
> > + "${EPREFIX}"/usr/lib/install-qa-check.d |
10 |
> > + ) |
11 |
> |
12 |
> For "cross-prefix" support, the EPREFIX usage here seems wrong. I think |
13 |
> we should use PORTAGE_OVERRIDE_EPREFIX instead of EPREFIX. For |
14 |
> reference, see has_version --host-root code in bin/phase-helpers.sh. |
15 |
|
16 |
I trust you being right :). |
17 |
|
18 |
> > + "${PORTAGE_BIN_PATH}"/install-qa-check.d |
19 |
> > + ) |
20 |
> > + |
21 |
> > + # Collect file names of QA checks. We need them early to support |
22 |
> > + # overrides properly. |
23 |
> > + for d in "${paths[@]}"; do |
24 |
> > + for f in "${d}"/*; do |
25 |
> > + [[ -f ${f} ]] && qa_checks+=( "${f##*/}" ) |
26 |
> > done |
27 |
> > done |
28 |
> > |
29 |
> > + # Now we need to sort the filenames lexically, and process |
30 |
> > + # them in order. |
31 |
> > + while IFS= read -r -d '' f; do |
32 |
> |
33 |
> I'm not sure how IFS is relevant here. Please clarify. |
34 |
|
35 |
Unsetting IFS prevents word splitting. Otherwise just the first word |
36 |
would get assigned to f and others discarded. |
37 |
|
38 |
-- |
39 |
Best regards, |
40 |
Michał Górny |