Buildfarm & cvsignore files

Started by Rocco Altierover 19 years ago2 messages
#1Rocco Altier
RoccoA@Routescape.com
1 attachment(s)

I noticed that the build farm is only looking for the cvs-ignore'd files
for a vpath build.

Attached is a patch that will stop at the CVS stage if there are any
cvs-ignore'd files in the clean repository.

Its not triggered by a from-source build, only what should have been a
clean check out.

Thanks,
-rocco

Show quoted text

-----Original Message-----
From: pgsql-hackers-owner@postgresql.org
[mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of
Andrew Dunstan
Sent: Sunday, September 03, 2006 11:45 AM
To: Tom Lane
Cc: Chris Browne; pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Second try
committing the path

Andrew Dunstan wrote:

Tom Lane wrote:

The buildfarm script is supposed to complain about

unexpected files in

the repository --- I wonder if it is fooled by the

.cvsignore entries

for these files?

Yes, we do. A patch made in July 2005 has this comment:

"ignore files listed in cvsignore files - this will stop

inappropriate

triggering of vpath builds."

Perhaps I should only do that for vpath builds. Or perhaps I should
even remove them at the end of a build, since we don't

expect any of

those files in a clean repo, do we?

Also, in case anyone has not got the message yet: Don't

ever build by

hand in the buildfarm repo. Ever. I mean it. Use a copy.

I have just committed a patch that removes the cvsignore trap. This
should be safe as we now remove them at the end of a
buildfarm vpath run.

cheers

andrew

---------------------------(end of
broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Attachments:

pgbf-cvsignore.patchapplication/octet-stream; name=pgbf-cvsignore.patchDownload
Index: run_build.pl
===================================================================
RCS file: /cvsroot/pgbuildfarm/client-code/run_build.pl,v
retrieving revision 1.69
diff -c -r1.69 run_build.pl
*** run_build.pl	8 Sep 2006 09:30:47 -0000	1.69
--- run_build.pl	27 Sep 2006 16:36:42 -0000
***************
*** 300,305 ****
--- 300,306 ----
  my $dbstarted;
  
  my %ignore_file = ();
+ my @cvsignore_file;
  
  # cleanup handler for all exits
  END
***************
*** 1000,1005 ****
--- 1001,1027 ----
  }
  
  
+ sub find_cvsignore
+ {
+ 	# skip CVS dirs if using update
+ 	if ($cvsmethod eq 'update' && $_ eq 'CVS' && -d $_)
+ 	{
+ 		$File::Find::prune = 1;
+ 	}
+ 	elsif (-f $_ && $_ eq '.cvsignore')
+ 	{
+ 		my $fh;
+ 		open($fh,$_) || die "cannot open $name for reading";
+ 		my @names = (<$fh>);
+ 		close($fh);
+ 		chomp @names;
+ 		foreach $name (@names) {
+ 			push (@cvsignore_file, "$File::Find::dir/$name" ) if (-f "$name");
+ 		}
+ 	}
+ }
+ 
+ 
  sub find_changed 
  {
  	# skip CVS dirs if using update
***************
*** 1073,1079 ****
  		my @statout = `cd pgsql && cvs -d $cvsserver status 2>&1`;
  		$unknown_files = grep { /^\?/ } @statout;
  	}
! 		
  	
  	send_result('CVS',$status,\@cvslog)	if ($status);
  	send_result('CVS-Merge',$merge_conflicts,\@cvslog) 
--- 1095,1103 ----
  		my @statout = `cd pgsql && cvs -d $cvsserver status 2>&1`;
  		$unknown_files = grep { /^\?/ } @statout;
  	}
! 
! 	File::Find::find({wanted => \&find_cvsignore}, 'pgsql') ;
! 	my $cvsignore_files = $#cvsignore_file+1;
  	
  	send_result('CVS',$status,\@cvslog)	if ($status);
  	send_result('CVS-Merge',$merge_conflicts,\@cvslog) 
***************
*** 1084,1089 ****
--- 1108,1115 ----
  			if ($mod_files);
  		send_result('CVS-Extraneous-Files',$unknown_files,\@cvslog)
  			if ($unknown_files);
+ 		send_result('CVS-Ignore-Files',$cvsignore_files,\@cvsignore_file)
+ 			if ($cvsignore_files);
  	}
  	$steps_completed = "CVS";
  
#2Andrew Dunstan
andrew@dunslane.net
In reply to: Rocco Altier (#1)
Re: Buildfarm & cvsignore files

Rocco Altier wrote:

I noticed that the build farm is only looking for the cvs-ignore'd files
for a vpath build.

Attached is a patch that will stop at the CVS stage if there are any
cvs-ignore'd files in the clean repository.

Its not triggered by a from-source build, only what should have been a
clean check out.

I thought I had that taped. Anyway, it can be done more simply. I will
fix it.

BTW, -hackers isn't really the place for buildfarm patches (or bugs,
usually) - that's what the buildfarm members list is for,.

cheers

andrew