From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8BDB8158089 for ; Fri, 22 Sep 2023 14:50:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 01E942BC04B; Fri, 22 Sep 2023 14:50:53 +0000 (UTC) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CE85F2BC013 for ; Fri, 22 Sep 2023 14:50:52 +0000 (UTC) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50437f39c9dso1393855e87.3 for ; Fri, 22 Sep 2023 07:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qap-la.20230601.gappssmtp.com; s=20230601; t=1695394251; x=1695999051; darn=lists.gentoo.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=BDe0VRdiHhhW8GKwpwATZSZzBc13dcSVUO+UPb2aK5g=; b=Ogf8OAdago5KTb7q5MOda5TNFxfb31aN5BKnaOcSETGJrGgmhp9gzl0bjyR+fM+v4d bnvTu6hNw53SWYgN94zorNknvLRJN93juxpwc6jHjSjqu4RcYO/hokjMlHKegNiJWRBx 37xDnYIPEZ55jQ3Q06DV7xW19UUChR/GgBbzI7/BwbQ1vdBB964Tv165DWnx7N6OGuAT 6YEmO8fF1UlvLtgLvx/8IFOKi22BoboBu8hkO2yWHOLUNsxO71lz7BtOmhdA5JHRO5VK yvrrAVeRUjeHRSthqa3hHFStE/qBufDozzofUn4vNfoUbK8weslO1KZxmDrKGtmzvylg 6hsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695394251; x=1695999051; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BDe0VRdiHhhW8GKwpwATZSZzBc13dcSVUO+UPb2aK5g=; b=G1fs+3W5j5FuxMv1BYnAtsTkog3jSxH946yAUQF6b7/q2Dis9sc/t2n6adhZBJzuIP l8d6SEpcdsMvMGFusyptPnLjUm8zxFlMzF2kKztSUC79xWiAJJsec478BlMJNMqK5zX2 0VTVHqv3FcQwuh1Z5AZ5UJzwMB83pWoMiC2df2AXP05UPf9mOl7ggNYhZ1IEFoe6Ac71 KWxm/r+pVlo+mCMbbH15WRnqR+UissAYAFzY70GKRBSu29YvIyELUSk0CLbEwVs6rLAf NaJXMEeiRxpBbY928iVi+Y/ekKz1c16Ol/U3dwGC6HCuJwjwWCdl63P8bxiBeDbfetME ArCA== X-Gm-Message-State: AOJu0YymLq90ycLpasrvOroQIV63CPba6SZjLszd8g1B7TxRoV2P866r e7Veub8T8nq+mw3aacVjGukOlwlp4WZSE22pidgJmdcmHxl+Sng8GCeXfg== X-Google-Smtp-Source: AGHT+IF1qiN58bSv6mvGdWkhhvqQq/v+prEJ9L1jXBxlDqfsAnJ7GkmiUenlTscU5nsKgiemNejOmFPqnV9LKkISXcw= X-Received: by 2002:a05:6512:3702:b0:503:182e:1def with SMTP id z2-20020a056512370200b00503182e1defmr7089440lfr.69.1695394251374; Fri, 22 Sep 2023 07:50:51 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <5b5dfbfd-9c7d-a26b-65e7-9f8c5e48bb8f@gentoo.org> <87msxfjix6.fsf@gentoo.org> <878r8yjohn.fsf@gentoo.org> <871qeqjmup.fsf@gentoo.org> In-Reply-To: <871qeqjmup.fsf@gentoo.org> From: Alex Boag-Munroe Date: Fri, 22 Sep 2023 15:50:40 +0100 Message-ID: Subject: Re: [gentoo-dev] Re: Standard parsable format for profiles/package.mask file To: gentoo-dev@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 42509185-cdd5-41b6-b832-b40aefd9fe88 X-Archives-Hash: 80d541ffa645ebe894d1dc543e03ad86 On Fri, 22 Sept 2023 at 15:37, Sam James wrote: > > > Alex Boag-Munroe writes: > > > Any reason for the parseable parts to not be in an established human > > readable/editable format? e.g. the config ini style format, or TOML? > > The only issue really is that depending on how it's done (do we do > it for the whole file, or just comments), it may need a new (profile) > EAPI which will take a while to implement and deploy. > > If it's just for comments, then we can do it immediately though. > > > > > To crib from the OP example with something configparser understands: > > [PREAMBLE] > > Timestamp: 2023-09-21 15:07:42+00:00 > > Author: Arthur Zamarin > > Justification: Very broken, no idea why packaged, need to drop ASAP. > > The project is done with supporting this package. > > Bugs: 667687, 667689 > > Removal Date: 2023-10-21 > > Packages: dev-lang/python > > > > The format is well documented already and simple to check for > > validity, so any GLEP would just need to cover correct keys/values. > > > > But yeah, I agree it's worth thinking about a proper format rather than > fragile text mangling going into the future. > Perhaps eventually it could/should be used for the whole file but as an interim/beginning there's no reason you couldn't start with comments: # [PREAMBLE] # Timestamp: 2023-09-21 15:07:42+00:00 # Author: Arthur Zamarin # Justification: Very broken, no idea why packaged, need to drop ASAP. # The project is done with supporting this package. # Bugs: 667687, 667689 # Packages: dev-lang/python dev-lang/python This simply adds a pre parse step of stripping the comments then feeding directly into configparser or probably more suitable, TOML since TOML has better syntax for directly delivering things like a "Packages:" key as a list. Redoing a bunch of package.* parsing probably wasn't in scope of the OP but I've always wondered and this felt an opportune moment to ask/suggest :) -- Ninpo