* [PATCH] Fix gcc_release to not build GO tarballs on old branches
@ 2011-04-21 12:32 Richard Guenther
2011-04-21 12:45 ` Jakub Jelinek
0 siblings, 1 reply; 3+ messages in thread
From: Richard Guenther @ 2011-04-21 12:32 UTC (permalink / raw)
To: gcc-patches; +Cc: Jakub Jelinek, Joseph S. Myers, Mark Mitchell
This changes maybe_build_tarfile to require that the first directory
in the list actually exists. This avoids building a GO tarball on
old branches where neither gcc/go nor libgo exist but libffi does.
I have built the 4.5.3 release candidate with this patch applied.
Looks ok?
Thanks,
Richard.
2011-04-21 Richard Guenther <rguenther@suse.de>
* gcc_release (maybe_build_tarfile): Require existance of the
first directory.
Index: maintainer-scripts/gcc_release
===================================================================
--- maintainer-scripts/gcc_release (revision 172819)
+++ maintainer-scripts/gcc_release (working copy)
@@ -258,6 +258,7 @@ maybe_build_tarfile() {
if [ -d "$maybe_dir" ]; then
dir_exists=1
fi
+ break;
done
if [ $dir_exists = 1 ]; then
build_tarfile "$dest" "$@"
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix gcc_release to not build GO tarballs on old branches
2011-04-21 12:32 [PATCH] Fix gcc_release to not build GO tarballs on old branches Richard Guenther
@ 2011-04-21 12:45 ` Jakub Jelinek
2011-04-21 12:57 ` Richard Guenther
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Jelinek @ 2011-04-21 12:45 UTC (permalink / raw)
To: Richard Guenther; +Cc: gcc-patches, Joseph S. Myers, Mark Mitchell
On Thu, Apr 21, 2011 at 01:36:53PM +0200, Richard Guenther wrote:
>
> This changes maybe_build_tarfile to require that the first directory
> in the list actually exists. This avoids building a GO tarball on
> old branches where neither gcc/go nor libgo exist but libffi does.
>
> I have built the 4.5.3 release candidate with this patch applied.
If we want to just test the first directory (and I agree with that,
the first directory is the language directory and in case of go libffi
is duplicated), having a loop and extra var is IMHO way overkill.
What about following instead?
2011-04-21 Jakub Jelinek <jakub@redhat.com>
* gcc_release (maybe_build_tarfile): Don't build a tarfile if
the first directory doesn't exist.
--- maintainer-scripts/gcc_release.jj 2010-12-09 11:12:50.000000000 +0100
+++ maintainer-scripts/gcc_release 2011-04-21 13:51:52.471180071 +0200
@@ -253,13 +253,7 @@ build_tarfile() {
maybe_build_tarfile() {
dest=$1
shift
- dir_exists=0
- for maybe_dir in "$@"; do
- if [ -d "$maybe_dir" ]; then
- dir_exists=1
- fi
- done
- if [ $dir_exists = 1 ]; then
+ if [ $# != 0 -a -d "$1" ]; then
build_tarfile "$dest" "$@"
else
echo "Not building $dest tarfile"
Jakub
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix gcc_release to not build GO tarballs on old branches
2011-04-21 12:45 ` Jakub Jelinek
@ 2011-04-21 12:57 ` Richard Guenther
0 siblings, 0 replies; 3+ messages in thread
From: Richard Guenther @ 2011-04-21 12:57 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: gcc-patches, Joseph S. Myers, Mark Mitchell
On Thu, 21 Apr 2011, Jakub Jelinek wrote:
> On Thu, Apr 21, 2011 at 01:36:53PM +0200, Richard Guenther wrote:
> >
> > This changes maybe_build_tarfile to require that the first directory
> > in the list actually exists. This avoids building a GO tarball on
> > old branches where neither gcc/go nor libgo exist but libffi does.
> >
> > I have built the 4.5.3 release candidate with this patch applied.
>
> If we want to just test the first directory (and I agree with that,
> the first directory is the language directory and in case of go libffi
> is duplicated), having a loop and extra var is IMHO way overkill.
>
> What about following instead?
Works for me if it works (my shell fu is quite limited).
Richard.
> 2011-04-21 Jakub Jelinek <jakub@redhat.com>
>
> * gcc_release (maybe_build_tarfile): Don't build a tarfile if
> the first directory doesn't exist.
>
> --- maintainer-scripts/gcc_release.jj 2010-12-09 11:12:50.000000000 +0100
> +++ maintainer-scripts/gcc_release 2011-04-21 13:51:52.471180071 +0200
> @@ -253,13 +253,7 @@ build_tarfile() {
> maybe_build_tarfile() {
> dest=$1
> shift
> - dir_exists=0
> - for maybe_dir in "$@"; do
> - if [ -d "$maybe_dir" ]; then
> - dir_exists=1
> - fi
> - done
> - if [ $dir_exists = 1 ]; then
> + if [ $# != 0 -a -d "$1" ]; then
> build_tarfile "$dest" "$@"
> else
> echo "Not building $dest tarfile"
>
> Jakub
>
>
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-21 12:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-21 12:32 [PATCH] Fix gcc_release to not build GO tarballs on old branches Richard Guenther
2011-04-21 12:45 ` Jakub Jelinek
2011-04-21 12:57 ` Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).