Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:master commit in: /
Date: Sun, 11 Aug 2019 19:55:41
Message-Id: 1565552908.9de72e7d230f7ad8822825ad204136233af95f47.whissi@gentoo
1 commit: 9de72e7d230f7ad8822825ad204136233af95f47
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 11 19:15:07 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 11 19:48:28 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=9de72e7d
7
8 gen_initramfs.sh: create_initramfs(): Change /etc/ld.so.cache creation
9
10 - Always generate or update /etc/ld.so.cache when possible.
11
12 - ldconfig will chroot due to "-r" parameter. Therefore, "-f" parameter
13 expects 'relative' path from chrooted root.
14
15 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
16
17 gen_initramfs.sh | 6 +++---
18 1 file changed, 3 insertions(+), 3 deletions(-)
19
20 diff --git a/gen_initramfs.sh b/gen_initramfs.sh
21 index 36b4678..c5e4a67 100755
22 --- a/gen_initramfs.sh
23 +++ b/gen_initramfs.sh
24 @@ -1603,12 +1603,12 @@ create_initramfs() {
25 "${CPIO_COMMAND}" --quiet -i -F "${CPIO_ARCHIVE}" 2>/dev/null \
26 || gen_die "Failed to extract cpio '${CPIO_ARCHIVE}' for dedupe"
27
28 - if [ -e etc/ld.so.cache ] && ! isTrue "$(tc-is-cross-compiler)"
29 + if ! isTrue "$(tc-is-cross-compiler)"
30 then
31 - # We can update /etc/ld.so.cache which was copied from host
32 + # We can generate or update /etc/ld.so.cache which was copied from host
33 # to actually match initramfs' content.
34 print_info 1 "$(get_indent 1)>> Pre-generating initramfs' /etc/ld.so.cache ..."
35 - ldconfig -f "${TDIR}/etc/ld.so.conf" -r . 2>/dev/null \
36 + ldconfig -f /etc/ld.so.conf -r "${TDIR}" 2>/dev/null \
37 || gen_die "Failed to pre-generate '${TDIR}/etc/ld.so.cache'!"
38 fi