1 |
Inline the __prepall function into install_qa_check(), and reflow it |
2 |
to cover the code more correctly. The arbitrary split between these |
3 |
functions has resulted in mismatches, with e.g. prepstrip being covered |
4 |
by mtree flag saving but dostrip being accidentally omitted. |
5 |
|
6 |
Signed-off-by: Michał Górny <mgorny@g.o> |
7 |
--- |
8 |
bin/misc-functions.sh | 48 ++++++++++++++++++++----------------------- |
9 |
1 file changed, 22 insertions(+), 26 deletions(-) |
10 |
|
11 |
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh |
12 |
index ff3d2a1ff..db7aaed5a 100755 |
13 |
--- a/bin/misc-functions.sh |
14 |
+++ b/bin/misc-functions.sh |
15 |
@@ -43,30 +43,6 @@ install_symlink_html_docs() { |
16 |
fi |
17 |
} |
18 |
|
19 |
-__prepall() { |
20 |
- if has chflags $FEATURES ; then |
21 |
- # Save all the file flags for restoration at the end of prepall. |
22 |
- mtree -c -p "${ED}" -k flags > "${T}/bsdflags.mtree" |
23 |
- # Remove all the file flags so that prepall can do anything necessary. |
24 |
- chflags -R noschg,nouchg,nosappnd,nouappnd "${ED}" |
25 |
- chflags -R nosunlnk,nouunlnk "${ED}" 2>/dev/null |
26 |
- fi |
27 |
- |
28 |
- [[ -d ${ED%/}/usr/share/info ]] && prepinfo |
29 |
- |
30 |
- # Apply compression. |
31 |
- "${PORTAGE_BIN_PATH}"/ecompress --queue "${PORTAGE_DOCOMPRESS[@]}" |
32 |
- "${PORTAGE_BIN_PATH}"/ecompress --ignore "${PORTAGE_DOCOMPRESS_SKIP[@]}" |
33 |
- "${PORTAGE_BIN_PATH}"/ecompress --dequeue |
34 |
- |
35 |
- ___eapi_has_dostrip || prepallstrip |
36 |
- |
37 |
- if has chflags $FEATURES ; then |
38 |
- # Restore all the file flags that were saved at the beginning of prepall. |
39 |
- mtree -U -e -p "${ED}" -k flags < "${T}/bsdflags.mtree" &> /dev/null |
40 |
- fi |
41 |
-} |
42 |
- |
43 |
install_qa_check() { |
44 |
local d f i qa_var x paths qa_checks=() checks_run=() |
45 |
if ! ___eapi_has_prefix_variables; then |
46 |
@@ -123,13 +99,33 @@ install_qa_check() { |
47 |
) |
48 |
done < <(printf "%s\0" "${qa_checks[@]}" | LC_ALL=C sort -u -z) |
49 |
|
50 |
- export STRIP_MASK |
51 |
- __prepall |
52 |
+ if has chflags $FEATURES ; then |
53 |
+ # Save all the file flags for restoration afterwards. |
54 |
+ mtree -c -p "${ED}" -k flags > "${T}/bsdflags.mtree" |
55 |
+ # Remove all the file flags so that we can do anything necessary. |
56 |
+ chflags -R noschg,nouchg,nosappnd,nouappnd "${ED}" |
57 |
+ chflags -R nosunlnk,nouunlnk "${ED}" 2>/dev/null |
58 |
+ fi |
59 |
+ |
60 |
+ [[ -d ${ED%/}/usr/share/info ]] && prepinfo |
61 |
+ |
62 |
+ # Apply compression. |
63 |
+ "${PORTAGE_BIN_PATH}"/ecompress --queue "${PORTAGE_DOCOMPRESS[@]}" |
64 |
+ "${PORTAGE_BIN_PATH}"/ecompress --ignore "${PORTAGE_DOCOMPRESS_SKIP[@]}" |
65 |
+ "${PORTAGE_BIN_PATH}"/ecompress --dequeue |
66 |
|
67 |
+ export STRIP_MASK |
68 |
if ___eapi_has_dostrip; then |
69 |
"${PORTAGE_BIN_PATH}"/estrip --queue "${PORTAGE_DOSTRIP[@]}" |
70 |
"${PORTAGE_BIN_PATH}"/estrip --ignore "${PORTAGE_DOSTRIP_SKIP[@]}" |
71 |
"${PORTAGE_BIN_PATH}"/estrip --dequeue |
72 |
+ else |
73 |
+ prepallstrip |
74 |
+ fi |
75 |
+ |
76 |
+ if has chflags $FEATURES ; then |
77 |
+ # Restore all the file flags that were saved earlier on. |
78 |
+ mtree -U -e -p "${ED}" -k flags < "${T}/bsdflags.mtree" &> /dev/null |
79 |
fi |
80 |
|
81 |
# Create NEEDED.ELF.2 regardless of RESTRICT=binchecks, since this info is |
82 |
-- |
83 |
2.19.1 |