From patchwork Sun Aug 28 13:18:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42029 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DDA9927BBEA; Sun, 28 Aug 2022 14:20:45 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9F39527BBE9 for ; Sun, 28 Aug 2022 14:20:45 +0100 (BST) Received: from localhost ([::1]:44408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDU-0003co-Q2 for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:20:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICx-00031b-KM for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39847) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICw-0002gL-QZ for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:11 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICw-0006zZ-MQ for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:10 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 18/20] TEMP REMOVE import: git: Restrict to non-github origins. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57460 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57460@debbugs.gnu.org Received: via spool by 57460-submit@debbugs.gnu.org id=B57460.166169278226718 (code B ref 57460); Sun, 28 Aug 2022 13:20:10 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:42 +0000 Received: from localhost ([127.0.0.1]:57811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICU-0006wh-7d for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:42 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:37129) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICO-0006vE-Mu for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:37 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MowOm-1pD9bR0R9a-00qPVs for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:31 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 7CDF165A51; Sun, 28 Aug 2022 15:18:56 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:44 +0200 Message-Id: <0ba96b5f2dfd841ab080e7a3373b6e335b62fd59.1661691695.git.h.goebel@crazy-compilers.com> X-Mailer: git-send-email 2.30.4 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:rVVo9ueOse79GRLoxLty0n9N6BgCrfShj4PKHHxUrfuZrTB3lox ZVzhsep3ZyHPFs9oRdYbExakMkr/kyRNE3HorWRwZQee5Uy7z9Trt0esFP4So1tppaUDhQ/ qcAvIv4QlRroUQXzj5e3iFK4lFye8bfa3qQunuciHeOgy26VNZeqwoevKwmpAAkW3TwOPe0 k0Yg/2SeOutcX3se7L/Tg== X-UI-Out-Filterresults: notjunk:1;V03:K0:zNEzmST/HZ4=:lKJ9leXPCEU+iVFyTaUJi7 Qroo03Vwc1NazI+zqXQNGXUIsGxZFy/V78miS6CJKC4g/Md7lcqx6wU5IDFEyREGxHBxBpM9m ota2jjXdY3v6a5KCg4IrkEJmx1cuSMIUhxRNPkoHHMVtXt/j13/Aaekb5jT5JOGqI8XQ4lPXL 3vViD3pg1rCgkyuzd1HbhX2zteMFgaqKOybRU1IN0vh5tK0T4CXHjiSGBz549mPMAIVy5THkJ 55WvQlTIXfRCTwQ5xAgAuUaMnNrjE3p6kZjByaMOKozkPKTjN7YTonIEj0I2UswpWkQ32xtek JOLUobPC4mG5zR5BojolTPuK2FA/P5EOYMUb+m36Cm3+urA/RVIyxUkA+FRjItnZj1t7z5lqn tbTZnupW6IG1Q1yuUSXGzukJmau7I9uEm3j192HDzHWggXHY2pJOOlTfqWguXBr7k1BzIc9ne vYNLbOsW3DZx4qnsdmEkdKWSFKcjyWMk6V+YS52MovxJD6mdEP5glBBDQK4fGWMtKcLONEiWe VMqNOV9KeVo2cj00ehDONm4LL5HZvaEJYEc3x/6zw+YMAvwFXdkAXaJ3LC9ukIk1fdxpFP5gk FpH9m2ljGl7wiOmI6mLFkYqruDRDa9/uNS4BRkXwK986zt465ZV0/RLrJmSJhZvCozaMo3bEf wpvvlJk6DfRsPH1mijfguEn23KPMynAgDuewv+PudYT4bQKT+CtyLly6vOpJ2P08X8CMDT3Sz 5pYnazBfuIeRiZQeNRoUGv7Q2CD8iYuQkvkjF9ERKE+EHwIUkwAgr9vZmY0= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This commit will be dropped and not be committed to the main branch! '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 fdac51edfd..02a851655d 100644 --- a/guix/import/git.scm +++ b/guix/import/git.scm @@ -25,6 +25,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) @@ -213,7 +214,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* (import-git-release package #:key (version #f)) diff --git a/guix/import/github.scm b/guix/import/github.scm index facdc96e24..01aa23ba15 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"))