diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2022-06-26 12:07:46 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2022-06-26 12:07:53 +0200 |
commit | 85010b0d7eb9d209cdc2dc61e955289556ecac43 (patch) | |
tree | 77c841dda2437d65dde0180738a6c3f5bfadd122 | |
parent | 15c37e8d893175df549f5fe95acb6e76e5acf11f (diff) | |
download | ptxdist-2022.07.0.tar.gz ptxdist-2022.07.0.tar.xz |
ptxd_make_world_update_md5: use ptxd_normalize_config for better log messagesptxdist-2022.07.0
'readlink -f' does not work well with ptxd_print_path and the paths may not
be shortend correctly.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_make_world_check_src.sh | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/scripts/lib/ptxd_make_world_check_src.sh b/scripts/lib/ptxd_make_world_check_src.sh index 6955c1ef2..2542c317e 100644 --- a/scripts/lib/ptxd_make_world_check_src.sh +++ b/scripts/lib/ptxd_make_world_check_src.sh @@ -12,25 +12,27 @@ # this only works if the makefile contains a "<PKG>_MD5 := ..." line. # ptxd_make_world_update_md5() { + local config file_dotconfig local PKG="$(ptxd_name_to_NAME "${pkg_label}")" set -- $(md5sum "${pkg_src}") local md5="${1}" local PKG_MD5="PTXCONF_${PKG}_MD5" for config in "${PTXDIST_PLATFORMCONFIG}" "${PTXDIST_PTXCONFIG}"; do - local conf="$(readlink -f "${config}")" - if grep -q "^${PKG_MD5}=\"" "${conf}"; then - sed -i "s/^${PKG_MD5}=\".*$/${PKG_MD5}=\"${md5}\"/" "${conf}" - ptxd_warning "New checksum for ${pkg_label}: ${md5} in $(ptxd_print_path "${conf}")" - if [ -e "${conf}.diff" ]; then - if grep -q "^${PKG_MD5}=\"" "${conf}.diff"; then - sed -i "s/^${PKG_MD5}=\".*$/${PKG_MD5}=\"${md5}\"/" "${conf}.diff" + file_dotconfig="${config}" + ptxd_normalize_config + if grep -q "^${PKG_MD5}=\"" "${file_dotconfig}"; then + sed -i "s/^${PKG_MD5}=\".*$/${PKG_MD5}=\"${md5}\"/" "${file_dotconfig}" + ptxd_warning "New checksum for ${pkg_label}: ${md5} in $(ptxd_print_path "${file_dotconfig}")" + if [ -e "${file_dotconfig}.diff" ]; then + if grep -q "^${PKG_MD5}=\"" "${file_dotconfig}.diff"; then + sed -i "s/^${PKG_MD5}=\".*$/${PKG_MD5}=\"${md5}\"/" "${file_dotconfig}.diff" else - echo "${PKG_MD5}=\"${md5}\"" >> "${conf}.diff" + echo "${PKG_MD5}=\"${md5}\"" >> "${file_dotconfig}.diff" if [ "${config}" == "${PTXDIST_PLATFORMCONFIG}" ]; then arg=" platform" fi - ptxd_warning "$(ptxd_print_path "${config}") is dirty. Run 'ptxdist oldconfig${arg}'." + ptxd_warning "$(ptxd_print_path "${file_dotconfig}") is dirty. Run 'ptxdist oldconfig${arg}'." fi fi return |