commit:     e02e7c0db8c358e4fa2b9acb1fa9e2c04754fef7
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 17 10:09:15 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 17 10:09:15 2023 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=e02e7c0d

SuspiciousSrcUriChange: fix mirrors in fetchables

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

 src/pkgcheck/checks/git.py | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/pkgcheck/checks/git.py b/src/pkgcheck/checks/git.py
index 23f984b4..8b272531 100644
--- a/src/pkgcheck/checks/git.py
+++ b/src/pkgcheck/checks/git.py
@@ -392,13 +392,27 @@ class GitPkgCommitsCheck(GentooRepoCheck, 
GitCommitsCheck):
             new_checksums = {
                 fetch.filename: (fetch.chksums, self._fetchable_str(fetch))
                 for pkg in self.repo.match(pkg)
-                for fetch in iflatten_instance(pkg.fetchables, fetchable)
+                for fetch in iflatten_instance(
+                    pkg.generate_fetchables(
+                        allow_missing_checksums=True,
+                        ignore_unknown_mirrors=True,
+                        skip_default_mirrors=True,
+                    ),
+                    fetchable,
+                )
             }
 
             old_checksums = {
                 fetch.filename: (fetch.chksums, self._fetchable_str(fetch))
                 for pkg in self.modified_repo(pkgset).match(pkg)
-                for fetch in iflatten_instance(pkg.fetchables, fetchable)
+                for fetch in iflatten_instance(
+                    pkg.generate_fetchables(
+                        allow_missing_checksums=True,
+                        ignore_unknown_mirrors=True,
+                        skip_default_mirrors=True,
+                    ),
+                    fetchable,
+                )
             }
         except (IndexError, FileNotFoundError, tarfile.ReadError):
             # ignore broken ebuild

Reply via email to