commit:     0883521640398078ae4f363ffad78eaa1626ee55
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 24 18:57:01 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 24 18:57:01 2023 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=08835216

RdependChange: skip when revbumped in same batch

Resolves: https://github.com/pkgcore/pkgcheck/issues/459
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 src/pkgcheck/checks/git.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/pkgcheck/checks/git.py b/src/pkgcheck/checks/git.py
index adc16874..c7c78bc8 100644
--- a/src/pkgcheck/checks/git.py
+++ b/src/pkgcheck/checks/git.py
@@ -340,7 +340,7 @@ class GitPkgCommitsCheck(GentooRepoCheck, GitCommitsCheck):
         else:
             yield MissingMove(old_key, new_key, pkg=pkg)
 
-    def modified_checks(self, pkgs):
+    def modified_checks(self, pkgs, added):
         """Check for issues due to package modifications."""
         pkg = pkgs[0]
 
@@ -361,7 +361,7 @@ class GitPkgCommitsCheck(GentooRepoCheck, GitCommitsCheck):
             # ignore broken ebuild
             return
 
-        if old_pkg.rdepend != new_pkg.rdepend:
+        if pkg not in added and old_pkg.rdepend != new_pkg.rdepend:
             yield RdependChange(pkg=new_pkg)
 
         old_slot, new_slot = old_pkg.slot, new_pkg.slot
@@ -437,7 +437,7 @@ class GitPkgCommitsCheck(GentooRepoCheck, GitCommitsCheck):
             yield from self.rename_checks(list(pkg_map["R"]))
         # run modified package checks
         if modified := [pkg for pkg in pkg_map["M"] if pkg not in 
pkg_map["D"]]:
-            yield from self.modified_checks(modified)
+            yield from self.modified_checks(modified, list(pkg_map["A"]))
 
         for git_pkg in pkgset:
             # remaining checks are irrelevant for removed packages

Reply via email to