On 05/01/2017 02:13 PM, Mikael Kjellström wrote:
> On 2017-04-19 15:59, Andrew Dunstan wrote:
>
>
>> I have released version 4.19 of the PostgreSQL Buildfarm client. It can
>> be downloaded from
>> <https://buildfarm.postgresql.org/downloads/releases/build-farm-4_19.tgz>
>>
>
> I don't know if it's only me or if others have noticed this also but I
> have the buildfarm client set up like this:
>
> /home/pgbf
> /home/pgbf/build-farm-4
> /home/pgbf/buildfarm@ -> build-farm-4.19/
> /home/pgbf/buildroot
>
> and then I have a cron job that does this:
>
> x y * * * cd /home/pgbf/buildfarm && ./run_build.pl REL9_6_STABLE
>
> and when it tries to run I get the following error:
>
> cannot create
> /usr/home/pgbf/buildroot/REL9_6_STABLE/loach.lastrun-logs/lastcomand.log:
> No such file or directory
> gmake is not GNU Make - please fix config file at ./run_build.pl line
> 343.
>
> if I manually create the directory loach.lastrun-logs the script then
> continues normally.
>
> I am no perl guru so I can't figure out really what is going on here.
> I think that the directory
> /usr/home/pgbf/buildroot/REL9_6_STABLE/loach.lastrun-logs needs to be
> created before the PGBuild/Utils.pm sub run_log tries to write to it.
>
>
OK, that's a bug. Mea culpa.
the quick fix is this patch:
diff --git a/run_build.pl b/run_build.pl
index aeb8966..822b4de 100755
--- a/run_build.pl
+++ b/run_build.pl
@@ -1008,7 +1008,8 @@ sub writelog
sub check_make
{
- my @out = run_log("$make -v");
+ # don't use run_log here - it's too early in the process
+ my @out = `$make -v 2>&1`;
return undef unless ($? == 0 && grep {/GNU Make/} @out);
return 'OK';
}
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services