Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5GiW-0007Iu-Rw for pgsql-hackers@arkaria.postgresql.org; Mon, 01 May 2017 19:10:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d5GiW-0003WU-ET for pgsql-hackers@arkaria.postgresql.org; Mon, 01 May 2017 19:10:40 +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 1d5GiV-0003VS-D9 for pgsql-hackers@postgresql.org; Mon, 01 May 2017 19:10:39 +0000 Received: from mail-qt0-x22d.google.com ([2607:f8b0:400d:c0d::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d5GiR-0001aB-DG for pgsql-hackers@postgresql.org; Mon, 01 May 2017 19:10:38 +0000 Received: by mail-qt0-x22d.google.com with SMTP id c45so95853999qtb.1 for ; Mon, 01 May 2017 12:10:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=PSC1PaGuAXa4xrEfXmIBdGslUEjnTit7zVmqef16hMU=; b=X2hrGX58DrvMUnpkClgivbIPyNNaalFEO4pVJ6UA8l/UgcPOe7S8/VmnCI3tWb8+uW CsAJ+7n3/B7q97ZfufnnX9RGHgab+sEKbCEi6PUK3ivRRa8anAbpWFe+mLNDo/1AwRUS RcQSJKxiEyFsOaE/AaspmCb75ntmyruvZrtEJEHBrClqxFtP9YBf6f/e2E2uB3Kh+LiM zdSF+KvRxXJVgmnNxioj88/OrZhAqUzmu9xEf5YYhDmc426XSneKe12ndRja97HoyFID WrzTiQcfxBBSh5T8hzy76KJljNGcB0minoVwp/qIbSKS8Q3oxpXURGcLaaVRKttz6vJ6 DLUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=PSC1PaGuAXa4xrEfXmIBdGslUEjnTit7zVmqef16hMU=; b=WPdd9bo3Tn3IDWrrqOLqiT/pvQVBxKL7DIPhb4O2qu20gmRxwaaPuWvPA6A/OkiF0G 3k1wuIj4wnhlsrHVMwlnZtuyY6NS/EzetbSePVCJzUYcv5/O4RgwWkyg3u8LnwGiOqor lwtccf2dVJV28mt5ZIJV7aLwT0sdaSSAKkorBxZHwhtJlGYaj70CHGAE2LdarHtpvwI6 hHzAZ9W5zTA7HIJ85HxL4iSi5pGSB/wrbJfVjLgMB94kz8i66eTH6qXMJy1ZcEVePgYh ot0y01+aqB4TLBwTbk7ypN80NHqFUwSnYUJeWu9Xdq25NH3s1lH5UdPLnil6YDijqgdO hELQ== X-Gm-Message-State: AN3rC/6+YhHIygtIys9LnzwCxIbiq8mrnsBduv+GztaxBypsu9khTblC 6ME33jUe93WIaRbujqOI8w== X-Received: by 10.237.43.66 with SMTP id p60mr26041520qtd.257.1493665833751; Mon, 01 May 2017 12:10:33 -0700 (PDT) Received: from [192.168.10.146] ([98.122.164.227]) by smtp.gmail.com with ESMTPSA id k10sm1181106qke.3.2017.05.01.12.10.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 May 2017 12:10:33 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: [buildfarm-members] BuildFarm client release 4.19 To: =?UTF-8?Q?Mikael_Kjellstr=c3=b6m?= , 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> Message-ID: <8763b0f6-12ac-9a87-df2b-6dd4e5d27c98@2ndQuadrant.com> Date: Mon, 1 May 2017 15:10:32 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-MW X-Pg-Spam-Score: -1.9 (-) 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 05/01/2017 03:00 PM, Mikael Kjellström wrote: > > On 2017-05-01 20:56, Andrew Dunstan wrote: >> OK, coming up with a more comprehensive fix. > > Ok. > >> The obvious workaround for now is to create the directory and dont zap >> it or its parents. You should only have to do it once (per branch) > > Yes, I know. That is what I have been doing so far. But if you want > to rerun a branch from scratch it's much easier to just do: > > rm -rf buildroot/HEAD > or > rm -rf buildroot/REL9_6_STABLE > > and then the buildfarm script should do the right thing and create all > the directories that it needs. > 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. 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; cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers