From: icp1994 <icp1994@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] xbps-src: improve update-check pattern for GitHub
Date: Sun, 03 Nov 2024 08:11:44 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-52894@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 720 bytes --]
There is a new pull request by icp1994 against master on the void-packages repository
https://github.com/icp1994/void-packages gh-update-check
https://github.com/void-linux/void-packages/pull/52894
xbps-src: improve update-check pattern for GitHub
#### Testing the changes
- I tested the changes in this PR: **YES**
This one catches tags of the form `<pkgname>-v<major>.<minor>.<patch>` which would get through the previous one. And possibly some other cursed patterns. But maybe there's some unintended side effects. I did check it against quite a few packages but GH sources are far too many to do an exhaustive testing.
A patch file from https://github.com/void-linux/void-packages/pull/52894.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gh-update-check-52894.patch --]
[-- Type: text/x-diff, Size: 1083 bytes --]
From 89696e3ea4667e9c32c9b60ca8f40b8575e21704 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sun, 3 Nov 2024 12:32:47 +0530
Subject: [PATCH] xbps-src: improve update-check pattern for GitHub
---
common/xbps-src/shutils/update_check.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh
index e626b307b7c65f..7d971ba8744c0e 100644
--- a/common/xbps-src/shutils/update_check.sh
+++ b/common/xbps-src/shutils/update_check.sh
@@ -139,7 +139,7 @@ update_check() {
*github.com*)
pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)"
url="https://github.com/$pkgurlname/tags"
- rx='/archive/refs/tags/(v?|\Q'"$pkgname"'\E[-_])?\K[\d.]+(?=\.tar\.gz")';;
+ rx='/archive/refs/tags/(\Q'"$pkgname"'\E|[-_v])*\K[\d.]+(?=\.tar\.gz")';;
*//gitlab.*|*code.videolan.org*)
case "$url" in
*/-/*) pkgurlname="$(printf %s "$url" | sed -e 's%/-/.*%%g; s%/$%%')";;
next reply other threads:[~2024-11-03 7:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-03 7:11 icp1994 [this message]
2025-02-02 1:59 ` github-actions
2025-02-03 18:39 ` [PR PATCH] [Updated] " icp1994
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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-52894@inbox.vuxu.org \
--to=icp1994@users.noreply.github.com \
--cc=ml@inbox.vuxu.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;
as well as URLs for NNTP newsgroup(s).