From c3407ae2317199c301863b5ac25c456845bdcb18 Mon Sep 17 00:00:00 2001 From: Arthur Zamarin Date: Tue, 16 Jan 2024 20:42:59 +0200 Subject: OldPackageName: new check for package named after old package name Resolves: https://github.com/pkgcore/pkgcheck/issues/650 Signed-off-by: Arthur Zamarin --- src/pkgcheck/checks/visibility.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src') 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() -- cgit v1.2.3-65-gdbad