Gentoo Archives: gentoo-commits

From: Matt Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:master commit in: /
Date: Mon, 02 Jan 2017 02:51:12
Message-Id: 1483317939.ea84d161aa142d642443623deb4cac27b028a63a.prometheanfire@gentoo
1 commit: ea84d161aa142d642443623deb4cac27b028a63a
2 Author: Matthew Thode <mthode <AT> mthode <DOT> org>
3 AuthorDate: Mon Jan 2 00:45:39 2017 +0000
4 Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 2 00:45:39 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=ea84d161
7
8 update initramfs generation to not always copy ld.so
9
10 fixes gen_initramfs.sh on musl systems
11
12 gen_initramfs.sh | 23 +++++++++++++++++------
13 1 file changed, 17 insertions(+), 6 deletions(-)
14
15 diff --git a/gen_initramfs.sh b/gen_initramfs.sh
16 index 1f62f5c..268bc2d 100755
17 --- a/gen_initramfs.sh
18 +++ b/gen_initramfs.sh
19 @@ -533,13 +533,24 @@ append_linker() {
20 rm -r "${TEMP}/initramfs-linker-temp"
21 fi
22
23 - mkdir -p "${TEMP}/initramfs-linker-temp/etc/ld.so.conf.d"
24 + mkdir -p "${TEMP}/initramfs-linker-temp/etc"
25
26 - cp "/etc/ld.so."{cache,conf} "${TEMP}/initramfs-linker-temp/etc/" 2> /dev/null \
27 - || gen_die "Could not copy ld.so.{cache,conf}"
28 -
29 - cp -r "/etc/ld.so.conf.d" "${TEMP}/initramfs-linker-temp/etc/" 2> /dev/null \
30 - || gen_die "Could not copy ld.so.conf.d"
31 + if [ -e "/etc/ld.so.conf" ]
32 + then
33 + cp "/etc/ld.so.conf" "${TEMP}/initramfs-linker-temp/etc/" 2> /dev/null \
34 + || gen_die "Could not copy ld.so.conf"
35 + fi
36 + if [ -e "/etc/ld.so.cache" ]
37 + then
38 + cp "/etc/ld.so.cache" "${TEMP}/initramfs-linker-temp/etc/" 2> /dev/null \
39 + || gen_die "Could not copy ld.so.cache"
40 + fi
41 + if [ -d "/etc/ld.so.conf.d" ]
42 + then
43 + mkdir -p "${TEMP}/initramfs-linker-temp/etc/ld.so.conf.d"
44 + cp -r "/etc/ld.so.conf.d" "${TEMP}/initramfs-linker-temp/etc/" 2> /dev/null \
45 + || gen_die "Could not copy ld.so.conf.d"
46 + fi
47
48 cd "${TEMP}/initramfs-linker-temp/"
49 log_future_cpio_content