aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2021-01-04 09:18:46 -0700
committerTim Harder <radhermit@gmail.com>2021-01-04 09:18:46 -0700
commitb11ddc9a9188d0ddfcc143f4876d2f818899b2c0 (patch)
tree89212c45e6d8af62a0bb99938c960ef8e4f41918
parentebuild.eclass: inject some man page defaults into docutils (diff)
downloadpkgcore-b11ddc9a9188d0ddfcc143f4876d2f818899b2c0.tar.gz
pkgcore-b11ddc9a9188d0ddfcc143f4876d2f818899b2c0.tar.bz2
pkgcore-b11ddc9a9188d0ddfcc143f4876d2f818899b2c0.zip
ebuild.eclass: fix duplicate ECLASS block check
-rw-r--r--src/pkgcore/ebuild/eclass.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pkgcore/ebuild/eclass.py b/src/pkgcore/ebuild/eclass.py
index c17bfe8ce..5de9e872e 100644
--- a/src/pkgcore/ebuild/eclass.py
+++ b/src/pkgcore/ebuild/eclass.py
@@ -460,9 +460,11 @@ class EclassDoc(AttrDict):
block_data = block_obj.parse(block, block_start)
# check if duplicate blocks exist and merge data
if block_obj.key is None:
- if block_data.keys() & data.keys():
+ # main @ECLASS block
+ if duplicates[tag]:
logger.warning(
f"'@ECLASS:', line {block_start}: duplicate block")
+ duplicates[tag] = True
# verify name is correct
file_name = os.path.basename(path)
if block_data.name != file_name:
@@ -470,6 +472,7 @@ class EclassDoc(AttrDict):
f"'@ECLASS:' invalid name {block_data.name!r} (should be {file_name!r})")
data.update(block_data)
else:
+ # item block
name = block_data['name']
if name in duplicates[tag]:
logger.warning(