From 33152ba710583cace2f5602cec4b4ce292b9e891 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 13 Aug 2014 14:32:02 +0000 Subject: [PATCH] touch cgo.a in %post, regardless --- golang.spec | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/golang.spec b/golang.spec index d766d18..0887274 100644 --- a/golang.spec +++ b/golang.spec @@ -42,7 +42,7 @@ Name: golang Version: 1.2.2 -Release: 20%{?dist} +Release: 21%{?dist} Summary: The Go Programming Language License: BSD @@ -607,12 +607,10 @@ fi %ifarch %{ix86} %post pkg-bin-linux-386 # since the cgo.a packaged in this rpm will be older than the other archives likely built on the ARM builder, -# then a multitude of packages will appear Stale. For sanity we'll check whether cgo is Stale, and plum it up to runtime.a -if go list -json runtime/cgo | grep -q Stale ; then - runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') - cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') - touch -r ${runtime_file} ${cgo_file} -fi +runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') +cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') +touch -r ${runtime_file} ${cgo_file} + %{_sbindir}/update-alternatives --install %{_bindir}/go \ go %{goroot}/bin/linux_386/go 90 \ --slave %{_bindir}/gofmt gofmt %{goroot}/bin/linux_386/gofmt @@ -626,12 +624,10 @@ fi %ifarch x86_64 %post pkg-bin-linux-amd64 # since the cgo.a packaged in this rpm will be older than the other archives likely built on the ARM builder, -# then a multitude of packages will appear Stale. For sanity we'll check whether cgo is Stale, and plum it up to runtime.a -if go list -json runtime/cgo | grep -q Stale ; then - runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') - cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') - touch -r ${runtime_file} ${cgo_file} -fi +runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') +cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') +touch -r ${runtime_file} ${cgo_file} + %{_sbindir}/update-alternatives --install %{_bindir}/go \ go %{goroot}/bin/linux_amd64/go 90 \ --slave %{_bindir}/gofmt gofmt %{goroot}/bin/linux_amd64/gofmt @@ -645,12 +641,10 @@ fi %ifarch %{arm} %post pkg-bin-linux-arm # since the cgo.a packaged in this rpm will be older than the other archives likely built on the ARM builder, -# then a multitude of packages will appear Stale. For sanity we'll check whether cgo is Stale, and plum it up to runtime.a -if go list -json runtime/cgo | grep -q Stale ; then - runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') - cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') - touch -r ${runtime_file} ${cgo_file} -fi +runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') +cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') +touch -r ${runtime_file} ${cgo_file} + %{_sbindir}/update-alternatives --install %{_bindir}/go \ go %{goroot}/bin/linux_arm/go 90 \ --slave %{_bindir}/gofmt gofmt %{goroot}/bin/linux_arm/gofmt @@ -948,6 +942,9 @@ fi %changelog +* Wed Aug 13 2014 Vincent Batts - 1.2.2-21 +- touch cgo.a regardless + * Wed Aug 13 2014 Vincent Batts - 1.2.2-20 - rpm dependency ordering for %%post