public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Arthur Zamarin" <arthurzam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: src/pkgcheck/checks/, ...
Date: Sun, 30 Oct 2022 18:04:36 +0000 (UTC)	[thread overview]
Message-ID: <1667152936.5e05fd7c59d0853e6472bf65d619cedafb4880b7.arthurzam@gentoo> (raw)

commit:     5e05fd7c59d0853e6472bf65d619cedafb4880b7
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 30 18:02:16 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 30 18:02:16 2022 +0000
URL:        https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=5e05fd7c

MissingRemoteIdCheck: fix bad suggestion for downloads.sourceforge.net

For sourceforge, the order of regexes was bad, resulting in it catching
`downloads.sourceforge.net` as project under `sourceforge.net` instead,
which is very wrong. Fix the order, and update the test to check for
this case specially.

On the same note, add support for `sourceforge.io` as a site - cause
looks like it also appears in the wild.

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

 src/pkgcheck/checks/metadata_xml.py                                 | 6 +++---
 .../MissingRemoteIdCheck/MissingRemoteId/expected.json              | 2 +-
 .../MissingRemoteIdCheck/MissingRemoteId/MissingRemoteId-2.ebuild   | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/pkgcheck/checks/metadata_xml.py b/src/pkgcheck/checks/metadata_xml.py
index 56dd2c94..06d62cf3 100644
--- a/src/pkgcheck/checks/metadata_xml.py
+++ b/src/pkgcheck/checks/metadata_xml.py
@@ -601,9 +601,9 @@ class MissingRemoteIdCheck(Check):
         ('pypi', r'https://files.pythonhosted.org/packages/source/\S/(?P<value>[^/]+)'),
         ('savannah', r'https://savannah.gnu.org/projects/(?P<value>[^/]+)'),
         ('savannah-nongnu', r'https://savannah.nongnu.org/projects/(?P<value>[^/]+)'),
-        ('sourceforge', r'https://(?P<value>[^/]+).sourceforge.net/'),
-        ('sourceforge', r'https://sourceforge.net/projects/(?P<value>[^/]+)'),
-        ('sourceforge', r'https://downloads.sourceforge.net/(?:project/)?(?P<value>[^/]+)'),
+        ('sourceforge', r'https://downloads.sourceforge.(net|io)/(?:project/)?(?P<value>[^/]+)'),
+        ('sourceforge', r'https://sourceforge.(net|io)/projects/(?P<value>[^/]+)'),
+        ('sourceforge', r'https://(?P<value>[^/]+).sourceforge.(net|io)/'),
         ('sourcehut', r'https://sr.ht/(?P<value>[^/]+/[^/]+)'),
     )
 

diff --git a/testdata/data/repos/eapis-testing/MissingRemoteIdCheck/MissingRemoteId/expected.json b/testdata/data/repos/eapis-testing/MissingRemoteIdCheck/MissingRemoteId/expected.json
index ab5ae2d4..9d74b4e9 100644
--- a/testdata/data/repos/eapis-testing/MissingRemoteIdCheck/MissingRemoteId/expected.json
+++ b/testdata/data/repos/eapis-testing/MissingRemoteIdCheck/MissingRemoteId/expected.json
@@ -1,4 +1,4 @@
 {"__class__": "MissingRemoteId", "category": "MissingRemoteIdCheck", "package": "MissingRemoteId", "remote_type": "gitlab", "value": "pkgcore/pkgcheck/extra/MissingRemoteId", "uri": "https://gitlab.com/pkgcore/pkgcheck/extra/MissingRemoteId/-/archive/1/MissingRemoteId-1.tar.bz2"}
 {"__class__": "MissingRemoteId", "category": "MissingRemoteIdCheck", "package": "MissingRemoteId", "remote_type": "heptapod", "value": "pkgcore/pkgcore", "uri": "https://foss.heptapod.net/pkgcore/pkgcore/-/archive/4/MissingRemoteId-4.tar.bz2"}
 {"__class__": "MissingRemoteId", "category": "MissingRemoteIdCheck", "package": "MissingRemoteId", "remote_type": "pypi", "value": "MissingRemoteId", "uri": "https://files.pythonhosted.org/packages/source/M/MissingRemoteId/MissingRemoteId-1.tar.gz"}
-{"__class__": "MissingRemoteId", "category": "MissingRemoteIdCheck", "package": "MissingRemoteId", "remote_type": "sourceforge", "value": "pkgcheck", "uri": "https://pkgcheck.sourceforge.net/"}
+{"__class__": "MissingRemoteId", "category": "MissingRemoteIdCheck", "package": "MissingRemoteId", "remote_type": "sourceforge", "value": "pkgcheck", "uri": "https://downloads.sourceforge.net/pkgcheck/MissingRemoteId-2.tar.gz"}

diff --git a/testdata/repos/eapis-testing/MissingRemoteIdCheck/MissingRemoteId/MissingRemoteId-2.ebuild b/testdata/repos/eapis-testing/MissingRemoteIdCheck/MissingRemoteId/MissingRemoteId-2.ebuild
index ed226b8e..2ee1bda2 100644
--- a/testdata/repos/eapis-testing/MissingRemoteIdCheck/MissingRemoteId/MissingRemoteId-2.ebuild
+++ b/testdata/repos/eapis-testing/MissingRemoteIdCheck/MissingRemoteId/MissingRemoteId-2.ebuild
@@ -1,7 +1,7 @@
 EAPI=7
 
 DESCRIPTION="Check homepage"
-HOMEPAGE="https://pkgcheck.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="https://pkgcore.github.io/pkgcheck/"
+SRC_URI="mirror://sourceforge/pkgcheck/${P}.tar.gz"
 LICENSE="BSD"
 SLOT="0"


             reply	other threads:[~2022-10-30 18:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30 18:04 Arthur Zamarin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-07-26  6:16 [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: src/pkgcheck/checks/, Arthur Zamarin
2025-07-15 18:30 Arthur Zamarin
2024-11-22 21:35 Michał Górny
2024-08-01 19:41 Arthur Zamarin
2023-09-23 15:10 Arthur Zamarin
2023-04-24 16:43 Arthur Zamarin
2023-02-03 13:03 Arthur Zamarin
2023-01-30 19:07 Arthur Zamarin
2023-01-18  5:19 Arthur Zamarin
2023-01-18  5:19 Arthur Zamarin
2023-01-14 20:29 Arthur Zamarin
2023-01-02 20:19 Arthur Zamarin
2022-10-13 17:06 Arthur Zamarin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1667152936.5e05fd7c59d0853e6472bf65d619cedafb4880b7.arthurzam@gentoo \
    --to=arthurzam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox