From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56960 invoked by alias); 22 Sep 2017 13:47:39 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 56935 invoked by uid 89); 22 Sep 2017 13:47:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=DATE, Hx-languages-length:988 X-Spam-User: qpsmtpd, 2 recipients X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 22 Sep 2017 13:47:36 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 1D29956547; Fri, 22 Sep 2017 09:47:35 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id S0kQDphBpFph; Fri, 22 Sep 2017 09:47:35 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id A3902561E8; Fri, 22 Sep 2017 09:47:34 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id C84028305C; Fri, 22 Sep 2017 06:47:32 -0700 (PDT) Date: Fri, 22 Sep 2017 13:47:00 -0000 From: Joel Brobecker To: Alan Modra Cc: Pedro Alves , Petr Ovtchenkov , Matthias Klose , Simon Marchi , Matt Rice , Fiodar Stryzhniou , Andreas Schwab , Binutils , GDB Subject: Re: [PATCH] bfd/version.h: Add rationale for BFD_VERSION_DATE (Re: meaning of "Automatic date update in version.in" commits) Message-ID: <20170922134732.tjihu4yvdeoltczv@adacore.com> References: <20170921184615.6b1e5d44@void-ptr.info> <426b9fdf-a854-6d5f-b296-df71ad0c1561@ubuntu.com> <20170921192619.412ff148@void-ptr.info> <20170921163358.twez7kbewucjalwi@adacore.com> <20170921195153.4ed9f319@void-ptr.info> <20170921170031.czr6to24sarve2or@adacore.com> <20170921203857.06810b63@void-ptr.info> <20170921235936.GB25070@bubble.grove.modra.org> <0f7c205c-7ecb-bc49-bf15-c753e576cdc0@redhat.com> <20170922133806.GH25070@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170922133806.GH25070@bubble.grove.modra.org> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2017-09/txt/msg00107.txt.bz2 > > I assume that the bot is just replacing the line with > > BFD_VERSION_DATE instead of regenerating the whole file from > > scratch, but that's just guessing. (I don't have sourceware > > shell access; I have no idea how the auto updater is implemented.) > > Back when I ran the cron job on my home machine, it did > sed -e 's/20[0-9]*/'`date +%Y%m%d`/ < bfd/version.h > bfd/version.h.new > > I'm not sure what is done nowadays. You could always commit the patch > and see what happens. :) It should work no problem, as long as there is no date in the comment. The script that we run nightly on sourceware.org (update-git-version) does pretty much the same as what you were doing: sed \ -e 's/[Y0-9][Y0-9][Y0-9][Y0-9]-[M0-9][M0-9]-[D0-9][D0-9]/'$date'/' \ -e 's/[Y0-9][Y0-9][Y0-9][Y0-9][M0-9][M0-9][D0-9][D0-9]/'$DATE'/' \ < ${file} > ${file}.new -- Joel