[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/23: import: git: Restrict to non-github origins.
From: |
guix-commits |
Subject: |
07/23: import: git: Restrict to non-github origins. |
Date: |
Mon, 4 Jul 2022 09:49:22 -0400 (EDT) |
htgoebel pushed a commit to branch wip-import-version
in repository guix.
commit ae51a1d1fc5323d7222ea7c99fc096c5d0b8325e
Author: Hartmut Goebel <h.goebel@crazy-compilers.com>
AuthorDate: Thu Jun 30 10:22:32 2022 +0200
import: git: Restrict to non-github origins.
'guix refresh -t generic-git' reported a lot of packages which are hosted at
github and are already handled by the github updater. So whether the
package
is updates using the github updater or the generic-git updater would be
non-deterministic.
And indeed 'guix refresh --list-updaters' without this change reported 31.2%
for the github updater and 34.9% for the generic-git updater. With this
patch, it's only 3.7% for the generic-git updater. (Still the sum of the
percent-values is 112%, anyhow better then the 146% prior to this change.)
Beside these statistical issues, this patch has another effect: If the
github
updater fails to pick a (later) version the generic-git updater was
triggered. Anyhow: Why should the generic-git updater be able to find
a (later) version, if the github updater did not?
* guix/import/github.scm: Export 'github-package?'.
* guix/import/git.scm(git-package?): Also check for not github-package?.
---
guix/import/git.scm | 4 +++-
guix/import/github.scm | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/guix/import/git.scm b/guix/import/git.scm
index 4cf404677c..8fd5d70af9 100644
--- a/guix/import/git.scm
+++ b/guix/import/git.scm
@@ -24,6 +24,7 @@
#:use-module (guix git)
#:use-module (guix git-download)
#:use-module (guix i18n)
+ #:use-module ((guix import github) #:select (github-package?))
#:use-module (guix packages)
#:use-module (guix upstream)
#:use-module (guix utils)
@@ -203,7 +204,8 @@ tag, or #false and #false if the latest version could not
be determined."
(match (package-source package)
((? origin? origin)
(and (eq? (origin-method origin) git-fetch)
- (git-reference? (origin-uri origin))))
+ (git-reference? (origin-uri origin))
+ (not (github-package? package))))
(_ #f)))
(define (latest-git-release package)
diff --git a/guix/import/github.scm b/guix/import/github.scm
index e1a1af7133..32b9d36f2a 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -42,7 +42,7 @@
#:use-module (guix http-client)
#:use-module (web uri)
#:use-module (web response)
- #:export (%github-api %github-updater))
+ #:export (%github-api %github-updater github-package?))
;; For tests.
(define %github-api (make-parameter "https://api.github.com"))
- branch wip-import-version created (now 926f9b0809), guix-commits, 2022/07/04
- 03/23: gnu: Add chicken-srfi-37., guix-commits, 2022/07/04
- 08/23: import: cpan: Remove unused exports., guix-commits, 2022/07/04
- 02/23: gnu: Add chicken-srfi-13., guix-commits, 2022/07/04
- 04/23: gnu: Add chicken-args., guix-commits, 2022/07/04
- 01/23: gnu: Add chicken-crypto-tools., guix-commits, 2022/07/04
- 05/23: import: egg: Fix updater., guix-commits, 2022/07/04
- 06/23: import: github: Fix updater., guix-commits, 2022/07/04
- 07/23: import: git: Restrict to non-github origins.,
guix-commits <=
- 09/23: updaters: issue error-message if version is given:, guix-commits, 2022/07/04
- 11/23: sourceforge: not supported, too complicate to implement., guix-commits, 2022/07/04
- 10/23: cran/bioconductor, guix-commits, 2022/07/04
- 12/23: gnu-maintenance (kernel.org, ftp, html, savannah, xorg, gnu), guix-commits, 2022/07/04
- 13/23: pypi:, guix-commits, 2022/07/04
- 15/23: egg, guix-commits, 2022/07/04
- 16/23: hexpm, guix-commits, 2022/07/04
- 14/23: crate, guix-commits, 2022/07/04
- 19/23: kde:, guix-commits, 2022/07/04
- 21/23: generic-git, guix-commits, 2022/07/04