From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 118E93985823; Mon, 21 Sep 2020 15:31:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 118E93985823 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 08LFV0wN004178 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Sep 2020 11:31:05 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 08LFV0wN004178 Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 608731E509; Mon, 21 Sep 2020 11:31:00 -0400 (EDT) Subject: Re: [PATCH] Import mklog.py from gcc repo To: gdb-patches@sourceware.org, binutils@sourceware.org References: <20200917202922.4179305-1-simon.marchi@polymtl.ca> From: Simon Marchi Message-ID: Date: Mon, 21 Sep 2020 11:31:00 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200917202922.4179305-1-simon.marchi@polymtl.ca> Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 21 Sep 2020 15:31:00 +0000 X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-DCC: debian: antispam2020.polymtl.ca 1169; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2020 15:31:10 -0000 On 2020-09-17 4:29 p.m., Simon Marchi wrote: > I've been using the mklog utility from the gcc repo for a while to > generate skeleton of ChangeLog entries. It recently got a rewrite as a > Python script. Unfortunately, to find the repository root, and > eventually to find in which ChangeLog file each entry goes, the new > script assumes it is located in the same git repository that it > generates ChangeLog entries for. > > This means that if you make a change in the gcc source tree and run > mklog.py from that same source tree, it works. But if you make changes > in your ~/src/binutils-gdb tree and run ~/src/gcc/contrib/mklog.py, it > won't work. > > IIRC, the old script required that you ran it with the project's root > directory as the CWD. > > The simplest way to fix this is to import the script in binutils-gdb and > use it from there. It's also nice because we can use it without having > a clone of the gcc repo. > > I also thought of adding a "--root" switch to the script to override the > project's base directory. However: > > 1) It is more work. > 2) If the script still lives in the gcc repo, it's less convenient than > having it in binutils-gdb. > > This patch imports contrib/mklog.py from the gcc repo, revision > c560591408440f441b8b327f5b41f9328d20b67b. > > contrib/ChangeLog: > > * mklog.py: New file, imported from gcc. > > Note: the ChangeLog entry above was generated using > `git show | ./mklog.py`! I'll push this at the end of the week if nobody disagrees. Simon