GNU bug report logs - #66396
[PATCH] guix: Add case to Github url updater.

Previous Next

Package: guix-patches;

Reported by: Giacomo Leidi <goodoldpaul <at> autistici.org>

Date: Sat, 7 Oct 2023 19:47:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Giacomo Leidi <goodoldpaul <at> autistici.org>
Subject: bug#66396: closed (Re: [bug#66396] [PATCH] guix: Add case to
 Github url updater.)
Date: Wed, 17 Apr 2024 09:14:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#66396: [PATCH] guix: Add case to Github url updater.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 66396 <at> debbugs.gnu.org.

-- 
66396: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66396
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: paul <goodoldpaul <at> autistici.org>
Cc: 66396-done <at> debbugs.gnu.org
Subject: Re: [bug#66396] [PATCH] guix: Add case to Github url updater.
Date: Wed, 17 Apr 2024 11:12:47 +0200
Hi,

paul <goodoldpaul <at> autistici.org> skribis:

> I made a detailed analysis on the current status of the updater. I'm
> attaching the source code I used.
>
> There are ~239 packages (probably with some false positive due to
> deprecated packages I believe) that have a github.com origin-uri that
> currently are marked as having no updater:
>
> guix time-machine -C channels-lock.scm -- repl -- t.scm | grep github.com | awk '{ print $1 }' | wc -l
>
> 239
>
> This patch allows the following packages (and probably more in
> downstream channels) to be refreshed:

Got it.  Finally applied with a commit log that explains this.

Thanks!

Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Giacomo Leidi <goodoldpaul <at> autistici.org>
To: guix-patches <at> gnu.org
Cc: Giacomo Leidi <goodoldpaul <at> autistici.org>
Subject: [PATCH] guix: Add case to Github url updater.
Date: Sat,  7 Oct 2023 21:45:11 +0200
* guix/import/github.scm (updated-github-url)[updated-url]: Add
additional heuristics to Github url updater.
---
 guix/import/github.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/guix/import/github.scm b/guix/import/github.scm
index 7409c9a202..c5556d78ee 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2019 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2022 Maxime Devos <maximedevos <at> telenet.be>
 ;;; Copyright © 2022 Hartmut Goebel <h.goebel <at> crazy-compilers.com>
+;;; Copyright © 2023 Giacomo Leidi <goodoldpaul <at> autistici.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,6 +25,7 @@
 
 (define-module (guix import github)
   #:use-module (ice-9 match)
+  #:use-module (ice-9 regex)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
@@ -96,6 +98,11 @@ (define (updated-github-url old-package new-version)
                             url)
             (string-append prefix "/releases/download/" repo "-" new-version "/"
                            repo "-" new-version ext))
+           ((string-match (string-append "/releases/download/(v)?" version "/"
+                                         name ".*" ext "$")
+                          url)
+            (string-replace-substring url version new-version))
+
            (#t #f))) ; Some URLs are not recognised.
         #f))
 

base-commit: 00a28bc435606dc98925fbae1ebe314881f35c90
-- 
2.41.0




This bug report was last modified 1 year and 93 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.