Github messages for voidlinux
 help / color / mirror / Atom feed
From: icp1994 <icp1994@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] common/xbps-src/shutils/update_check.sh: tweak url and rx for codeberg
Date: Tue, 23 Aug 2022 18:26:29 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38860@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 587 bytes --]

There is a new pull request by icp1994 against master on the void-packages repository

https://github.com/icp1994/void-packages tweak-codeberg-update-check
https://github.com/void-linux/void-packages/pull/38860

common/xbps-src/shutils/update_check.sh: tweak url and rx for codeberg
Exhaustive verification is cheap due to low volume
`grep -lr --include template codeberg srcpkgs/ | cut -d/ -f2 | xargs -n1 ./xbps-src update-check`

On current master `mdcat` and `nsxiv` reports `NO VERSION`.

A patch file from https://github.com/void-linux/void-packages/pull/38860.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tweak-codeberg-update-check-38860.patch --]
[-- Type: text/x-diff, Size: 1228 bytes --]

From 4c13135acf7e0b33d6d6b784ea65d39783e7b7c4 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Mon, 22 Aug 2022 00:33:12 +0530
Subject: [PATCH] common/xbps-src/shutils/update_check.sh: tweak url and rx for
 codeberg

Accommodate for more patterns in distfile urls.
---
 common/xbps-src/shutils/update_check.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh
index 80ab6e8889d8..ec53ed9f38e6 100644
--- a/common/xbps-src/shutils/update_check.sh
+++ b/common/xbps-src/shutils/update_check.sh
@@ -149,8 +149,8 @@ update_check() {
                 rx='/crates/'${pkgname#rust-}'/\K[0-9.]*(?=/download)' ;;
             *codeberg.org*)
                 pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)"
-                url="https://codeberg.org/$pkgurlname/releases"
-                rx='/archive/\K[\d.]+(?=\.tar\.gz)' ;;
+                url="https://codeberg.org/$pkgurlname/tags"
+                rx='/archive/(v-?|\Q'"$pkgname"'\E-)?\K[\d.]+(?=\.tar\.gz)' ;;
             *hg.sr.ht*)
                 pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)"
                 url="https://hg.sr.ht/$pkgurlname/tags"

             reply	other threads:[~2022-08-23 16:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23 16:26 icp1994 [this message]
2022-08-24 18:01 ` [PR PATCH] [Merged]: " classabbyamp

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-38860@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).