Skip to content

Commit

Permalink
Merge pull request #1502 from jsmeix/run_ldconfig_in_non_mandatory_wa…
Browse files Browse the repository at this point in the history
…y_at_the_end_of_copy_binaries_libraries

Run ldconfig non mandatory at the end
of 390_copy_binaries_liraries.sh
to get a consitent libraries configuration
in the recovery system to avoid issues like
#1494
but do not treat a ldconfig failure as fatal
(only report the failure but do not error out)
so that it could still work for special cases as
#772
  • Loading branch information
jsmeix committed Sep 19, 2017
2 parents 06a488f + 511a01d commit 6afc9a0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion usr/share/rear/build/GNU/Linux/390_copy_binaries_libraries.sh
Expand Up @@ -49,5 +49,17 @@ for lib in "${all_libs[@]}" ; do
fi
done

#ldconfig $v -r "$ROOTFS_DIR" >&2 || Error "Could not configure libraries with ldconfig"
# Run ldconfig for the libraries in the recovery system
# to get the libraries configuration in the recovery system consistent as far as possible
# because an inconsistent libraries configuration in the recovery system could even cause
# that the recovery system fails to boot with kernel panic because init fails
# when a library is involved where init is linked with, for example see
# https://github.com/rear/rear/issues/1494
# In case of ldconfig errors report it but do not treat it as fatal (i.e. do not Error out)
# because currently it is sometimes not possible to get a consistent libraries configuration
# and usually (i.e. unless one has an unusual special libraries configuration)
# even an inconsistent libraries configuration works sufficiently, for example see
# https://github.com/rear/rear/issues/772
# TODO: Get the libraries configuration in the recovery system consistent in any case.
ldconfig $v -r "$ROOTFS_DIR" 1>&2 || LogPrintError "Configuring rescue/recovery system libraries with ldconfig failed which may casuse arbitrary failures"

0 comments on commit 6afc9a0

Please sign in to comment.