From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wmqyJ+0j+Wew1C8AWB0awg (envelope-from ) for ; Fri, 11 Apr 2025 10:15:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1744380909; bh=oi4Mu10xeUOElqccxF29TIFRH34Q0AHvD5Xfto3qOnQ=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=kDAHJZxxhDbyHapu2ibl7erAhtfF2KRBuBXyg57bt3vit4XsFL+jzeASZ91TuOM5p LwLKyYpWp76wM5KQgdArBYAFdk3KRVjmq1XLbX5yV/3MTEvrNUPJ5FiTHXjwxjtAQq KTz9SYDgqVEMqyJNkvD7yRU0wr8es6u5IoyRHDlg= Received: by simark.ca (Postfix, from userid 112) id 929721E0C3; Fri, 11 Apr 2025 10:15:09 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=HHSL6dTZ; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=b9vbJYti; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 810831E05C for ; Fri, 11 Apr 2025 10:15:08 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1C34938515C0 for ; Fri, 11 Apr 2025 14:15:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1C34938515C0 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=HHSL6dTZ; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=b9vbJYti Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id CF10F3858C48 for ; Fri, 11 Apr 2025 14:14:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CF10F3858C48 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CF10F3858C48 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1744380860; cv=none; b=ZrIuHAPKhDc+ygRAuZzDCruUhHLglGxXUNcnq9EM2hxWWXqvOVvSiglvGZN2W0Zz/4n1sEGDwW9Tw0AySQMFnhVxoUZvxdb8muhinytyT6r5xkU2ykdIHkihsv9l2MR6Bw6QfLgNf9wloHNWAwg+rzQBy3iwO8WunO7Ftv5t4rw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1744380860; c=relaxed/simple; bh=oi4Mu10xeUOElqccxF29TIFRH34Q0AHvD5Xfto3qOnQ=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:To:From; b=Ai4OYk43gv27t2xHj8AW9YBv4qZxotkS+YztIIAHX0Z7EdBa4QkBRJNHkOLNzm6IQ0zed3gEprnHVkPpXAaFO/4B3lcu7eBM2lbx5aGB8bE1l7upDpg1eGYj5iE0JPl9EG+ae7k37n1VUVsOwov+0q1pUluqXMw8VWig7th3An8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF10F3858C48 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1744380859; bh=oi4Mu10xeUOElqccxF29TIFRH34Q0AHvD5Xfto3qOnQ=; h=Date:Subject:To:References:From:In-Reply-To:From; b=HHSL6dTZjxvOKJfmIdm88VKfrmMHzteeGg5DoQtgfcJx7zN0wuCDNfE84MsPx78yu SbHfVNeITDY2cWYojgBlTBPWvbQh0S7zuLoQRYbmrG9H2UTWYsG0RWRKILAF8vLlFs RFiP3iOw+BSXwZpgGJlX0odvjNpu+wkgjedMCwGI= Received: by simark.ca (Postfix, from userid 112) id 82AFE1E100; Fri, 11 Apr 2025 10:14:19 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1744380858; bh=oi4Mu10xeUOElqccxF29TIFRH34Q0AHvD5Xfto3qOnQ=; h=Date:Subject:To:References:From:In-Reply-To:From; b=b9vbJYtiIB5+iSQ/hn8ntrC4seNvdNwo6YgqahiRX8mKq2ukJDNOLygMDc7Mwr2EQ aq3GZdOhWtuwfPlgZxvFO7i0u7JevECpUJ8ZHvbpG9CJ9U085xg7pXeO0P4pmAiUF0 m5Xw3wffcpuucRmNRH3EPctM/YZoFYtwHOy+do14= Received: from [10.0.0.170] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 0E3F21E05C; Fri, 11 Apr 2025 10:14:18 -0400 (EDT) Message-ID: <10aa0484-dde4-46c5-a94d-356741d0f8a1@simark.ca> Date: Fri, 11 Apr 2025 10:14:17 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] gdb: fix bugs in gdb/copyright.py, make it use glob patterns To: Guinevere Larsen , Simon Marchi , gdb-patches@sourceware.org References: <20250409145002.30405-1-simon.marchi@efficios.com> <20250409145002.30405-2-simon.marchi@efficios.com> <74ee87af-688f-4567-bc7d-042597b2c723@redhat.com> Content-Language: fr From: Simon Marchi In-Reply-To: <74ee87af-688f-4567-bc7d-042597b2c723@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 4/11/25 9:52 AM, Guinevere Larsen wrote: > On 4/9/25 11:49 AM, Simon Marchi wrote: >> gdb/copyright.py currently changes some files that it shouldn't: >> >> - despite having a `gnulib/import` entry in EXCLUDE_LIST, it does >> change the files under that directory >> - it is missing `sim/Makefile.in` >> >> Change the exclude list logic to use glob patterns. This makes it >> easier to specify exclusions of full directories or files by basename, >> while simplifying the code. >> >> Merge EXCLUDE_LIST and NOT_FSF_LIST, since there's no fundamental reason >> to keep them separate (they are treated identically). I kept the >> comment that explains that some files are excluded due to not being >> FSF-licensed. >> >> Merge EXCLUDE_ALL_LIST in EXCLUDE_LIST, converting the entries to glob >> patterns that match everywhere in the tree (e.g. `**/configure`). >> >> Tested by running the script on the parent commit of d01e823438c7 >> ("Update copyright dates to include 2025") and diff'ing the result with >> d01e823438c7. The only differences are: >> >> - the files that we don't want to modify (gnulib/import and >> sim/Makefile.in) >> - the files that need to be modified by hand >> >> Running the script on latest master produces no diff. > > Is there any reason why you turned all globals into lists instead of tuples? > > From what I can see in the script (and my understanding of it), there's no reason why the arrays should be mutable, so using the immutable tuple type would be better IMO. BY_HAND being an empty tuple messes up the typing, so I made it a list[str] to say that if it contained something, it would be strings. And then because I'm adding EXCLUDE_LIST and BY_HAND, it's easier if EXCLUDE_LIST is also a list[str]. But I can work around that one by doing: full_exclude_list = list(EXCLUDE_LIST) + BY_HAND That all could be avoided if we just removed the BY_HAND thing, since it's unused at the moment. But I thought it would be cheap to keep it around just it case we need it in the future. Not sure which is better. Simon