From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id /+8ML0Er+We43S8AWB0awg (envelope-from ) for ; Fri, 11 Apr 2025 10:46:25 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=V7vXrItF; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B4C7C1E0C3; Fri, 11 Apr 2025 10:46:25 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=4.0.1 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 415191E05C for ; Fri, 11 Apr 2025 10:46:25 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9ED01382FC8E for ; Fri, 11 Apr 2025 14:46:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9ED01382FC8E Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=V7vXrItF Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 457B43830B6C for ; Fri, 11 Apr 2025 14:45:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 457B43830B6C Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 457B43830B6C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1744382714; cv=none; b=gNdy7J3aASRTxOjBGdqTdH4gsjuT90sxQpZabsm7f+2Mt2LQtK5tk/fgpjHzaK87Cs8TQujz4Xg4PhG+UmT0VbL5nFtr5ds9/NIlHrj3+O9tkm/5+Q/ywJW6be9tP6hi8GGnpIENYyHxXv32tZmgfUbyUnvvP7nEXSaCW1piF/k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1744382714; c=relaxed/simple; bh=aHDg4a5uhzSHBCixP4wrzDcCYqG+MuITPuQ040kgbb4=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=KAnWjYkaiPINKWCqBNLpIRWI2YAUWQ7m3Wt8MPS51pV3/bm99ojKEeN6Z6dRk066rtbuUWZv0gHl4hZAePVZBXtZIK8caRLHwSwBhJTknpVDzhGWwOnhKDoau01+ngmogTE2u4x4AXE/04+iztLRzyxEmTOpRiDnad2n3/bP8Ts= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 457B43830B6C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1744382714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uVB+P4NGXKF1lITrRF9dlvbtBUmVNzCtDlnkayMm52I=; b=V7vXrItFV4QbLLRy0+56VjvX7cvKG9ZGjIjN1QDGju23nF3V/tV6deY/XJj5TtCVQJopA8 Ozfnh4WmhsiPAo6Lp7OBk+9aVLCWWGTp8Pu9JAV2Pcg5CWD6jtvz4dqOUTeBLJEaG3fbUY d/gKyhwJUEMEWYACeDWvj7TTnN6Gaco= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-383-VYfjA3rQOhGfetjwJMgfXw-1; Fri, 11 Apr 2025 10:45:12 -0400 X-MC-Unique: VYfjA3rQOhGfetjwJMgfXw-1 X-Mimecast-MFC-AGG-ID: VYfjA3rQOhGfetjwJMgfXw_1744382712 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2254bdd4982so28627775ad.1 for ; Fri, 11 Apr 2025 07:45:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744382711; x=1744987511; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uVB+P4NGXKF1lITrRF9dlvbtBUmVNzCtDlnkayMm52I=; b=QaX8za9VK4O2yMQsl125Y5KPShZZ3912dblnZWZ+MgvbE84OmiemxoK7X3dKLFNqli OOf0U7xCTLcXVb6Y1xH76ssI3O4uQ7bagt0Y5LTiUw90YiC9Mq5E0YlT0E1o0VL1QURO CA2J8R6gXKfRvjfBhncTqJ6f2ylM2MQKYdl09zs3DL1kVirXMDkxUgCb57v7zOh62whv Dz0HMYG3fCizzyp5QrwyWYkppkH4OsJMFr9DGxkUicjbzEAg9C4P7adEgutYFROkfQa8 jcToVonTVhc0RWa1y69bSwaNW98pxuRcgQwNzyZjW6eHNXf03jhwNJfAGHgTB2dTepLI ubQA== X-Forwarded-Encrypted: i=1; AJvYcCX9uNWZmcqkBos6nldQz2cWtLWNVTEgdSqwUG76r2tpwAa6+mdnUQMUqumfxyoGEsZkqWVaksrbLXR3bg==@sourceware.org X-Gm-Message-State: AOJu0Yy37FSp6U802bd55BZiL1PpHAM5Npb1cVa8pKaSNjqJI+m6vX6Y 1rDqEUN+CBOTxPaoTj/OhWMlKKeEhdT2kGAqueQCuQD7SYXyszWkPr21dX0lfVED/eEaPP4wDTV rhOBkkfrDejKav8LZ6Q4NQngpzcrVFuHfSm5WvBG5SGTk0qc3EbRGMsovuntXRZ/92ME= X-Gm-Gg: ASbGncsUYLvhyYtPt8Cu2Roeyy+mB9njxpAgDduMaqd2CLhEjv2PnOt1tZQ1UTcpDFq kqFsPCiqFghTV7P4yP7BP8+cCZWnMu2a5ELiWLKdIZ1Rv9fKgreet5fp97uI8WsiZhUHuGEz6TE YpAPdUzXemI/bc2wM3rC85mAdV/eEVKONaT1k9p+asV6+gMlqq/+hC0kUaeJ4NgmPef2mIdVeWo zTNUuMTb2fAIjfgib34MMcg6nT4cLGJeVI/XM4mdyQwC9sJ21SrRpHd8/0tL4H9ZJ3Wr20Y9r+Z 96ZhbQMJGZCYOmYtP0gpYE8= X-Received: by 2002:a17:902:db05:b0:224:8bf:6d81 with SMTP id d9443c01a7336-22bea4fca91mr42609325ad.46.1744382711525; Fri, 11 Apr 2025 07:45:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFRBqbqHMMqELxbftEfPodJWW2LVt5+ucfy+oAdhosP7x2WLb1hS/fsmxGwYUH9k2UBumcmUw== X-Received: by 2002:a17:902:db05:b0:224:8bf:6d81 with SMTP id d9443c01a7336-22bea4fca91mr42608975ad.46.1744382711103; Fri, 11 Apr 2025 07:45:11 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:9a69::1001? ([2804:14d:8084:9a69::1001]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73bd21c65c9sm1638101b3a.61.2025.04.11.07.45.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Apr 2025 07:45:10 -0700 (PDT) Message-ID: <4a8030f1-34f2-4217-9711-413ba709d5e8@redhat.com> Date: Fri, 11 Apr 2025 11:45:08 -0300 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: Simon Marchi , 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> <10aa0484-dde4-46c5-a94d-356741d0f8a1@simark.ca> From: Guinevere Larsen In-Reply-To: <10aa0484-dde4-46c5-a94d-356741d0f8a1@simark.ca> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: MuZFTyLJ-qKtZK8D25tNEsvHr--yiYepeTfnKqyeqJ4_1744382712 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 11:14 AM, Simon Marchi wrote: > 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 would flipping that expression to     full_exclude_list = EXCLUDE_LIST + tuple(BY_HAND) also mess up the typing? If that's the case, I'm fine with keeping them as lists, it was a minor nit anyway > > 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. Yeah, I think recognizing that some files may need to be changed by hand, and keeping that easy is a good idea. > > Simon > -- Cheers, Guinevere Larsen She/Her/Hers