commit:     6473e0a96a03598a9e22904d1fe011913efaac5a
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 14 23:46:30 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 14 23:46:30 2021 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=6473e0a9

gen_compile.sh: populate_binpkg(): Use libc.a for testing if glibc has changed

NSS files module was merged into libc in >=glibc-2.34 so it can't be used
to test for changed glibc version anymore.

Using libc.a seems to be the better alternative which we use already in
get_chost_libdir() and depend on in general.

In addition, a check was added to ensure that our glibc test file really
exists (older-than check would pass if our test file would be missing
which is not what we want).

Fixes: 61049d29 ("gen_compile.sh: populate_binpkg(): Throw away binpkg when 
glibc has changed")
Bug: https://bugs.gentoo.org/823716
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_compile.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gen_compile.sh b/gen_compile.sh
index e2b86cc..9af128b 100755
--- a/gen_compile.sh
+++ b/gen_compile.sh
@@ -515,7 +515,12 @@ populate_binpkg() {
                if isTrue "$(is_glibc)"
                then
                        local libdir=$(get_chost_libdir)
-                       local glibc_test_file="${libdir}/libnss_files.so"
+                       local glibc_test_file="${libdir}/libc.a"
+
+                       if [[ ! -f "${glibc_test_file}" ]]
+                       then
+                               gen_die "Internal error: File 
'${glibc_test_file}' not found! Do not know how to deal with this glibc 
version."
+                       fi
 
                        if [[ "${BINPKG}" -ot "${glibc_test_file}" ]]
                        then

Reply via email to