aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-07-19 09:21:53 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2024-07-19 09:21:53 +0300
commit04c8872e3a47e5ad32690c0483bc5c4001ee8412 (patch)
treec7ebb925392a54a9d098d4a2c3e03752216ac732 /src
parentOldPackageNameDep: check for dependency using pkgmoved name (diff)
downloadpkgcheck-04c8872e3a47e5ad32690c0483bc5c4001ee8412.tar.gz
pkgcheck-04c8872e3a47e5ad32690c0483bc5c4001ee8412.tar.bz2
pkgcheck-04c8872e3a47e5ad32690c0483bc5c4001ee8412.zip
BadDependency: catch := slot operator in PDEPEND
Resolves: https://github.com/pkgcore/pkgcheck/issues/693 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r--src/pkgcheck/checks/metadata.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/pkgcheck/checks/metadata.py b/src/pkgcheck/checks/metadata.py
index 2cbb8985..3c3b4bf9 100644
--- a/src/pkgcheck/checks/metadata.py
+++ b/src/pkgcheck/checks/metadata.py
@@ -942,10 +942,15 @@ class DependencyCheck(Check):
if all(map(self.deprecated, pkgs)):
deprecated[attr].add(atom)
- if in_or_restriction and atom.slot_operator == "=":
- yield BadDependency(
- attr, atom, "= slot operator used inside || block", pkg=pkg
- )
+ if atom.slot_operator == "=":
+ if in_or_restriction:
+ yield BadDependency(
+ attr, atom, "= slot operator used inside || block", pkg=pkg
+ )
+ elif attr == "pdepend" and not atom.blocks:
+ # prohibited by PMS at the "Slot dependencies" section
+ msg = "':=' operator is invalid in"
+ yield BadDependency(attr, atom, msg, pkg=pkg)
if pkg.eapi.options.has_use_dep_defaults and atom.use is not None:
missing_use_deps = self._check_use_deps(attr, atom)