1.1 --- a/scripts/build/libc/eglibc.sh Wed May 25 20:23:48 2011 +0200
1.2 +++ b/scripts/build/libc/eglibc.sh Fri May 27 22:02:30 2011 -0300
1.3 @@ -109,15 +109,26 @@
1.4 [ "${addon}" = "nptl" ] && continue || true
1.5 CT_Pushd "${CT_SRC_DIR}/eglibc-${CT_LIBC_VERSION}"
1.6 CT_Extract nochdir "eglibc-${addon}-${CT_LIBC_VERSION}"
1.7 +
1.8 + CT_TestAndAbort "Error in add-on '${addon}': both short and long names in tarball" \
1.9 + -d "${addon}" -a -d "eglibc-${addon}-${CT_LIBC_VERSION}"
1.10 +
1.11 # Some addons have the 'long' name, while others have the
1.12 # 'short' name, but patches are non-uniformly built with
1.13 # either the 'long' or 'short' name, whatever the addons name
1.14 - # so we have to make symlinks from the existing to the missing
1.15 - # Fortunately for us, [ -d foo ], when foo is a symlink to a
1.16 - # directory, returns true!
1.17 - [ -d "${addon}" ] || ln -s "eglibc-${addon}-${CT_LIBC_VERSION}" "${addon}"
1.18 - [ -d "eglibc-${addon}-${CT_LIBC_VERSION}" ] || ln -s "${addon}" "eglibc-${addon}-${CT_LIBC_VERSION}"
1.19 + # but we prefer the 'short' name and avoid duplicates.
1.20 + if [ -d "eglibc-${addon}-${CT_LIBC_VERSION}" ]; then
1.21 + mv "eglibc-${addon}-${CT_LIBC_VERSION}" "${addon}"
1.22 + fi
1.23 +
1.24 + ln -s "${addon}" "eglibc-${addon}-${CT_LIBC_VERSION}"
1.25 +
1.26 CT_Patch nochdir "eglibc" "${addon}-${CT_LIBC_VERSION}"
1.27 +
1.28 + # Remove the long name since it can confuse configure scripts to run
1.29 + # the same source twice.
1.30 + rm "eglibc-${addon}-${CT_LIBC_VERSION}"
1.31 +
1.32 CT_Popd
1.33 done
1.34
2.1 --- a/scripts/build/libc/glibc.sh Wed May 25 20:23:48 2011 +0200
2.2 +++ b/scripts/build/libc/glibc.sh Fri May 27 22:02:30 2011 -0300
2.3 @@ -54,15 +54,24 @@
2.4 [ "${addon}" = "nptl" ] && continue || true
2.5 CT_Extract nochdir "glibc-${addon}-${CT_LIBC_VERSION}"
2.6
2.7 + CT_TestAndAbort "Error in add-on '${addon}': both short and long names in tarball" \
2.8 + -d "${addon}" -a -d "glibc-${addon}-${CT_LIBC_VERSION}"
2.9 +
2.10 # Some addons have the 'long' name, while others have the
2.11 # 'short' name, but patches are non-uniformly built with
2.12 # either the 'long' or 'short' name, whatever the addons name
2.13 - # so we have to make symlinks from the existing to the missing
2.14 - # Fortunately for us, [ -d foo ], when foo is a symlink to a
2.15 - # directory, returns true!
2.16 - [ -d "${addon}" ] || CT_DoExecLog ALL ln -s "glibc-${addon}-${CT_LIBC_VERSION}" "${addon}"
2.17 - [ -d "glibc-${addon}-${CT_LIBC_VERSION}" ] || CT_DoExecLog ALL ln -s "${addon}" "glibc-${addon}-${CT_LIBC_VERSION}"
2.18 + # but we prefer the 'short' name and avoid duplicates.
2.19 + if [ -d "glibc-${addon}-${CT_LIBC_VERSION}" ]; then
2.20 + mv "glibc-${addon}-${CT_LIBC_VERSION}" "${addon}"
2.21 + fi
2.22 +
2.23 + ln -s "${addon}" "glibc-${addon}-${CT_LIBC_VERSION}"
2.24 +
2.25 CT_Patch nochdir "glibc" "${addon}-${CT_LIBC_VERSION}"
2.26 +
2.27 + # Remove the long name since it can confuse configure scripts to run
2.28 + # the same source twice.
2.29 + rm "glibc-${addon}-${CT_LIBC_VERSION}"
2.30 done
2.31
2.32 # The configure files may be older than the configure.in files