GNU bug report logs - #34097
[PATCH] import: github: Do not update URI for packages using git-fetch.

Previous Next

Package: guix-patches;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Wed, 16 Jan 2019 10:14:01 UTC

Severity: normal

Tags: patch

Done: Arun Isaac <arunisaac <at> systemreboot.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34097 in the body.
You can then email your comments to 34097 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#34097; Package guix-patches. (Wed, 16 Jan 2019 10:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arun Isaac <arunisaac <at> systemreboot.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 16 Jan 2019 10:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: guix-patches <at> gnu.org
Cc: Eric Bavier <ericbavier <at> centurylink.net>
Subject: [PATCH] import: github: Do not update URI for packages using
 git-fetch.
Date: Wed, 16 Jan 2019 15:43:09 +0530
[Message part 1 (text/plain, inline)]
During `guix refresh PACKAGE`, the source URI for packages using
git-fetch need not be updated. It can be returned unchanged, as it
is. The attached patch does that.

As a side issue, without this patch, git-fetch packages that do not have
a source URI ending in ".git" are not updated correctly using `guix
refresh PACKAGE`. See the package emacs-evil for an example.

[0001-import-github-Do-not-update-URI-for-packages-using-g.patch (text/x-patch, inline)]
From f63bf518395a06dd0c947222e177a66e59c59e96 Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac <at> systemreboot.net>
Date: Wed, 16 Jan 2019 15:21:06 +0530
Subject: [PATCH] import: github: Do not update URI for packages using
 git-fetch.

* guix/import/github.scm (updated-github-url): Return the unchanged source URI
for packages using git-fetch.
[updated-url]: Do not handle URIs which end with ".git".
---
 guix/import/github.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/guix/import/github.scm b/guix/import/github.scm
index ad662e7b02..b287313d98 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2016 Ben Woodcroft <donttrustben <at> gmail.com>
 ;;; Copyright © 2017, 2018 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2018 Eric Bavier <bavier <at> member.fsf.org>
+;;; Copyright © 2019 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -54,7 +55,6 @@ false if none is recognized"
                                       (github-user-slash-repository url)))
               (repo    (github-repository url)))
           (cond
-           ((string-suffix? ".git" url) url)
            ((string-suffix? (string-append "/tarball/v" version) url)
             (string-append prefix "/tarball/v" new-version))
            ((string-suffix? (string-append "/tarball/" version) url)
@@ -99,7 +99,7 @@ false if none is recognized"
              ((source-uri ...)
               (find updated-url source-uri))))
      ((eq? fetch-method download:git-fetch)
-      (updated-url (download:git-reference-url source-uri)))
+      (download:git-reference-url source-uri))
      (else #f))))
 
 (define (github-package? package)
-- 
2.19.2

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#34097; Package guix-patches. (Wed, 16 Jan 2019 10:49:02 GMT) Full text and rfc822 format available.

Message #8 received at 34097 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 34097 <at> debbugs.gnu.org, Eric Bavier <ericbavier <at> centurylink.net>
Subject: Re: [bug#34097] [PATCH] import: github: Do not update URI for
 packages using git-fetch.
Date: Wed, 16 Jan 2019 11:48:00 +0100
Hi,

Arun Isaac <arunisaac <at> systemreboot.net> skribis:

> During `guix refresh PACKAGE`, the source URI for packages using
> git-fetch need not be updated. It can be returned unchanged, as it
> is. The attached patch does that.
>
> As a side issue, without this patch, git-fetch packages that do not have
> a source URI ending in ".git" are not updated correctly using `guix
> refresh PACKAGE`. See the package emacs-evil for an example.
>
> From f63bf518395a06dd0c947222e177a66e59c59e96 Mon Sep 17 00:00:00 2001
> From: Arun Isaac <arunisaac <at> systemreboot.net>
> Date: Wed, 16 Jan 2019 15:21:06 +0530
> Subject: [PATCH] import: github: Do not update URI for packages using
>  git-fetch.
>
> * guix/import/github.scm (updated-github-url): Return the unchanged source URI
> for packages using git-fetch.
> [updated-url]: Do not handle URIs which end with ".git".

LGTM, thanks!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#34097; Package guix-patches. (Wed, 16 Jan 2019 14:33:02 GMT) Full text and rfc822 format available.

Message #11 received at 34097 <at> debbugs.gnu.org (full text, mbox):

From: Eric Bavier <ericbavier <at> centurylink.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Arun Isaac <arunisaac <at> systemreboot.net>, 34097 <at> debbugs.gnu.org
Subject: Re: [bug#34097] [PATCH] import: github: Do not update URI for
 packages using git-fetch.
Date: Wed, 16 Jan 2019 08:32:05 -0600
[Message part 1 (text/plain, inline)]
On Wed, 16 Jan 2019 11:48:00 +0100
Ludovic Courtès <ludo <at> gnu.org> wrote:

> Hi,
> 
> Arun Isaac <arunisaac <at> systemreboot.net> skribis:
> 
> > During `guix refresh PACKAGE`, the source URI for packages using
> > git-fetch need not be updated. It can be returned unchanged, as it
> > is. The attached patch does that.
> >
> > As a side issue, without this patch, git-fetch packages that do not have
> > a source URI ending in ".git" are not updated correctly using `guix
> > refresh PACKAGE`. See the package emacs-evil for an example.
> >
> > From f63bf518395a06dd0c947222e177a66e59c59e96 Mon Sep 17 00:00:00 2001
> > From: Arun Isaac <arunisaac <at> systemreboot.net>
> > Date: Wed, 16 Jan 2019 15:21:06 +0530
> > Subject: [PATCH] import: github: Do not update URI for packages using
> >  git-fetch.
> >
> > * guix/import/github.scm (updated-github-url): Return the unchanged source URI
> > for packages using git-fetch.
> > [updated-url]: Do not handle URIs which end with ".git".  
> 
> LGTM, thanks!

LGTM too.  I had considered something similar when I first patched the
updater for git-fetch, but hadn't found an example where it was needed
(e.g. "emacs-evil").  Thanks!

`~Eric
[Message part 2 (application/pgp-signature, inline)]

Reply sent to Arun Isaac <arunisaac <at> systemreboot.net>:
You have taken responsibility. (Wed, 16 Jan 2019 16:23:01 GMT) Full text and rfc822 format available.

Notification sent to Arun Isaac <arunisaac <at> systemreboot.net>:
bug acknowledged by developer. (Wed, 16 Jan 2019 16:23:02 GMT) Full text and rfc822 format available.

Message #16 received at 34097-done <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Eric Bavier <ericbavier <at> centurylink.net>, Ludovic Courtès <ludo <at> gnu.org>
Cc: 34097-done <at> debbugs.gnu.org
Subject: Re: [bug#34097] [PATCH] import: github: Do not update URI for
 packages using git-fetch.
Date: Wed, 16 Jan 2019 21:51:42 +0530
[Message part 1 (text/plain, inline)]
Pushed! Thank you both for the review.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 14 Feb 2019 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 65 days ago.

Previous Next


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