From: "Arthur Zamarin" <arthurzam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pkgcore/pkgcore:master commit in: src/pkgcore/ebuild/
Date: Mon, 26 Dec 2022 17:28:04 +0000 (UTC) [thread overview]
Message-ID: <1672075644.4bd982b59ab334c2c8da7f700034dc9ca71c048a.arthurzam@gentoo> (raw)
commit: 4bd982b59ab334c2c8da7f700034dc9ca71c048a
Author: Brian Harring <ferringb <AT> gmail <DOT> com>
AuthorDate: Mon Dec 26 00:32:13 2022 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Mon Dec 26 17:27:24 2022 +0000
URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=4bd982b5
Convert to eapi_obj usage for subslot/iuse defaults in atom parsing.
We already paid the cost of looking up the eapi obj constants, thus use it,
and remove the atom implementations awareness of magic eapi constants.
Signed-off-by: Brian Harring <ferringb <AT> gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
src/pkgcore/ebuild/atom.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/pkgcore/ebuild/atom.py b/src/pkgcore/ebuild/atom.py
index c24a6d9ef..0bcd76b6c 100644
--- a/src/pkgcore/ebuild/atom.py
+++ b/src/pkgcore/ebuild/atom.py
@@ -132,7 +132,13 @@ class atom(boolean.AndRestriction, metaclass=klass.generic_equality):
elif x[0] == "-":
x = x[1:]
- if x[-1] == ")" and eapi not in ("0", "1", "2", "3"):
+ if x[-1] == ")":
+ if not eapi_obj.options.has_use_dep_defaults:
+ raise errors.MalformedAtom(
+ orig_atom,
+ f"use dep defaults are not allowed in EAPI {eapi_obj}",
+ )
+
# use defaults.
if x[-3:] in ("(+)", "(-)"):
x = x[:-3]
@@ -182,7 +188,7 @@ class atom(boolean.AndRestriction, metaclass=klass.generic_equality):
slot = None
else:
slots = (slot,)
- if eapi not in ("0", "1", "2", "3", "4"):
+ if eapi_obj.options.sub_slotting:
if slot[0:1] in ("*", "="):
if len(slot) > 1:
raise errors.MalformedAtom(
next reply other threads:[~2022-12-26 17:28 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-26 17:28 Arthur Zamarin [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-06-13 16:40 [gentoo-commits] proj/pkgcore/pkgcore:master commit in: src/pkgcore/ebuild/ Arthur Zamarin
2023-12-26 17:45 Arthur Zamarin
2023-10-23 17:35 Arthur Zamarin
2023-06-30 20:08 Arthur Zamarin
2023-02-04 19:52 Arthur Zamarin
2023-01-17 20:50 Arthur Zamarin
2023-01-03 18:06 Arthur Zamarin
2022-12-26 17:28 Arthur Zamarin
2022-12-26 17:28 Arthur Zamarin
2022-12-26 17:28 Arthur Zamarin
2022-12-26 17:28 Arthur Zamarin
2022-12-26 17:28 Arthur Zamarin
2022-12-25 17:40 Arthur Zamarin
2022-12-22 7:11 Arthur Zamarin
2022-12-22 7:11 Arthur Zamarin
2022-12-22 7:11 Arthur Zamarin
2022-12-22 7:11 Arthur Zamarin
2022-12-22 7:11 Arthur Zamarin
2022-12-13 19:58 Arthur Zamarin
2022-11-26 11:17 Arthur Zamarin
2022-10-29 11:56 Arthur Zamarin
2022-10-16 16:38 Arthur Zamarin
2022-10-04 8:24 Arthur Zamarin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1672075644.4bd982b59ab334c2c8da7f700034dc9ca71c048a.arthurzam@gentoo \
--to=arthurzam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox