diff options
author | Rob Savoye <rob.savoye@linaro.org> | 2015-07-28 18:25:28 -0600 |
---|---|---|
committer | Ryan S. Arnold <ryan.arnold@linaro.org> | 2015-08-03 11:00:09 -0500 |
commit | fb7406990284e80ab29d1e4048cc00f41faed428 (patch) | |
tree | 477e799d30fc605149703238b0c934f1942964f6 /lib | |
parent | 8905e35ab693ba8cab32a82b9535eb29fee5c861 (diff) |
Adjust the manifest file fields when a source tarball is used for input.
Change-Id: Ie052e8f99ad1923bb629894942427e52d46ad350
Diffstat (limited to 'lib')
-rw-r--r-- | lib/package.sh | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/lib/package.sh b/lib/package.sh index cc075932..01292d37 100644 --- a/lib/package.sh +++ b/lib/package.sh @@ -408,7 +408,7 @@ manifest() fi rm -f ${outfile} - cat >> ${outfile} <<EOF + cat >> ${outfile} <<EOF # Build machine data build=${build} host=${host} @@ -425,21 +425,46 @@ mpfr_versionnum=${mpfr_version} # Binutils binutils_branch=${binutils_version} +EOF + + if test "`echo ${binutils_branch} | grep -c \.tar\.`" -eq 0; then + cat >> ${outfile} <<EOF binutils_revision=${binutils_revision} binutils_version=binutils-gdb.git@${binutils_revision} +EOF + fi + + cat >> ${outfile} <<EOF # DejaGnu dejagnu_version=${dejagnu_version} # GDB gdb_branch=${gdb_version} + +EOF + + if test "`echo ${gdb_branch} | grep -c \.tar\.`" -eq 0; then + cat >> ${outfile} <<EOF gdb_revision=${gdb_revision} gdb_version=binutils-gdb.git@${gdb_revision} +EOF + fi + + cat >> ${outfile} <<EOF # GCC gcc_branch=${gcc_branch} -gcc_revision=${gcc_revision} -gcc_version=gcc.git@${gcc_revision} +EOF + + if test "`echo ${gcc_branch} | grep -c \.tar\.`" -eq 0; then + cat >> ${outfile} <<EOF + echo gcc_revision=${gcc_revision} + echo gcc_version=gcc.git@${gcc_revision} +EOF + fi + + cat >> ${outfile} <<EOF # C Library clibrary=${clibrary} @@ -456,7 +481,7 @@ EOF # Gerrit info, if triggered if test x"${gerrit_trigger}" = xyes; then - cat >> ${outfile} <<EOF + cat >> ${outfile} <<EOF gerrit_branch=${gerrit_branch} gerrit_revision=${gerrit_revision} @@ -496,9 +521,13 @@ EOF ;; esac - local srcdir="`get_srcdir ${gcc_version}`" echo "---------------------------------------------" >> ${outfile} - cd ${srcdir} && git log -n 1 >> ${outfile} + if test "`echo ${gcc_branch} | grep -c \.tar\.`" -eq 0; then + local srcdir="`get_srcdir ${gcc_version}`" + # Invoke in a subshell in order to prevent state-change of the current + # working directory after manifest is called. + $(cd ${srcdir} && git log -n 1 >> ${outfile}) + fi echo ${outfile} return 0 |