Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5GrS-0007kF-Hf for pgsql-hackers@arkaria.postgresql.org; Mon, 01 May 2017 19:19:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d5GrR-0000qZ-KH for pgsql-hackers@arkaria.postgresql.org; Mon, 01 May 2017 19:19:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d5GrQ-0000q5-Gq; Mon, 01 May 2017 19:19:52 +0000 Received: from yoda.llamalab.com ([194.14.207.58] helo=yoda.mksoft.nu) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d5GrN-0001he-LE; Mon, 01 May 2017 19:19:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mksoft.nu; s=20151129; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject; bh=3LMwREgxJXqK7sz1pV8F90MKIoIkA0DKAsnhcf804fQ=; b=Ine70+pX/oqb51tbLdCQmR8RaZwnKy6fH5cFK1KRgQONpyY+feJ7hJnc1ox6vUH2ZgS4BmT/vxbM3TvB24L3i72OKec8iGGw5M8COqf7B/5sd72z5RfEiaxnucaHpOVs/NKTbWQiRN+Zy3KVqdZU8AZzs7EEl0DnRx+U7Zn9H0SyofUJHl+CLfp6zDAFKXuN6/m77CI6R9JoT0SCfqu56QY3DzM5fyemqlrrAOVaMPp9Q9ujp/jsCa2s0bCUWi+GZVm4C4BTaT5bFZmg38jczixNU6xXHzXUtZ9I5q7CrDpBfYfYicDek9AvKDkGmtwRhxlRwF0SsCxiIBqg45YDVg==; Received: from c83-250-83-50.bredband.comhem.se ([83.250.83.50] helo=[10.100.0.2]) by yoda.mksoft.nu with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1d5GrL-0000zL-Pr; Mon, 01 May 2017 21:19:48 +0200 Subject: Re: [buildfarm-members] BuildFarm client release 4.19 To: Andrew Dunstan , PostgreSQL-development , buildfarm-members@postgresql.org References: <3eef634f-4d0a-8f27-e4e9-67080b44f637@2ndQuadrant.com> <1b1da59b-3280-7934-6a59-c57d8c86c84c@mksoft.nu> <2cdca268-76ef-994f-5b87-ca37164fadf4@2ndQuadrant.com> <8763b0f6-12ac-9a87-df2b-6dd4e5d27c98@2ndQuadrant.com> From: =?UTF-8?Q?Mikael_Kjellstr=c3=b6m?= Message-ID: Date: Mon, 1 May 2017 21:19:44 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <8763b0f6-12ac-9a87-df2b-6dd4e5d27c98@2ndQuadrant.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -4.3 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2017-05-01 21:10, Andrew Dunstan wrote: > Not sure I understand what "rerun a branch" from scratch means. If you > zap the branch directory you lose all its state. That's generally a bad > thing. I mean like the first time when you set up the buildfarm client / branch. And it's not something I recomend doing all the time but some times when the buildfarm client doesn't clean up after it self and there are a lot of crap left it's "easier" to just zap everything and start over to get it running again. > Anyway, this patch should fix it for all uses. It creates the directory > if it doesn't exist. > > diff --git a/PGBuild/Utils.pm b/PGBuild/Utils.pm > index 91c1362..175eaa7 100644 > --- a/PGBuild/Utils.pm > +++ b/PGBuild/Utils.pm > @@ -14,6 +14,8 @@ See accompanying License file for license details > use strict; > use warnings; > > +use File::Path; > + > use Exporter (); > our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); > > @@ -30,8 +32,9 @@ use vars qw($VERSION); $VERSION = 'REL_4.19'; > sub run_log > { > my $command = shift; > - my $file= > - > "$main::branch_root/$main::st_prefix$main::logdirname/lastcomand.log"; > + my $filedir = > "$main::branch_root/$main::st_prefix$main::logdirname"; > + mkpath($filedir); > + my $file= "$filedir/lastcomand.log"; > unlink $file; > system("$command > $file 2>&1"); > my @loglines; Ok. Thanks. Will try it out. /Mikael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers