aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-01-16 20:42:59 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2024-01-17 08:37:35 +0200
commitc3407ae2317199c301863b5ac25c456845bdcb18 (patch)
tree5224787bbbeaa727b2cbbe6df66baf7763550d24 /src
parentDockerfile: purge some more caches (diff)
downloadpkgcheck-c3407ae2317199c301863b5ac25c456845bdcb18.tar.gz
pkgcheck-c3407ae2317199c301863b5ac25c456845bdcb18.tar.bz2
pkgcheck-c3407ae2317199c301863b5ac25c456845bdcb18.zip
OldPackageName: new check for package named after old package name
Resolves: https://github.com/pkgcore/pkgcheck/issues/650 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r--src/pkgcheck/checks/visibility.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/pkgcheck/checks/visibility.py b/src/pkgcheck/checks/visibility.py
index 874d1bbf..050b923b 100644
--- a/src/pkgcheck/checks/visibility.py
+++ b/src/pkgcheck/checks/visibility.py
@@ -214,6 +214,23 @@ class NonsolvableDepsInExp(NonsolvableDeps):
_profile = "exp"
+class OldPackageName(results.PackageResult, results.Error):
+ """Package uses old name which is source of pkgmove.
+
+ Package is using ``${CATEGORY}/${PN}`` which is the source of a
+ pkgmove. It should be updated to the destination (new name) from
+ this repository or one of its master repositories.
+ """
+
+ def __init__(self, new_name: str, **kwargs):
+ super().__init__(**kwargs)
+ self.new_name = new_name
+
+ @property
+ def desc(self):
+ return f"package uses old name which is source of pkgmove, rename into {self.new_name!r}"
+
+
class VisibilityCheck(feeds.EvaluateDepSet, feeds.QueryCache, Check):
"""Visibility dependency scans.
@@ -232,6 +249,7 @@ class VisibilityCheck(feeds.EvaluateDepSet, feeds.QueryCache, Check):
NonsolvableDepsInDev,
NonsolvableDepsInExp,
DependencyMoved,
+ OldPackageName,
}
)
@@ -269,6 +287,9 @@ class VisibilityCheck(feeds.EvaluateDepSet, feeds.QueryCache, Check):
# vcs ebuild that better not be visible
yield from self.check_visibility_vcs(pkg)
+ if pkg.key in self.pkgmoves:
+ yield OldPackageName(self.pkgmoves[pkg.key], pkg=pkg)
+
suppressed_depsets = []
for attr in (x.lower() for x in pkg.eapi.dep_keys):
nonexistent = set()