From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 16 05:10:58 2021 Received: (at submit) by debbugs.gnu.org; 16 Nov 2021 10:10:58 +0000 Received: from localhost ([127.0.0.1]:57301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmvQY-0003Mr-9C for submit@debbugs.gnu.org; Tue, 16 Nov 2021 05:10:58 -0500 Received: from lists.gnu.org ([209.51.188.17]:38220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmvQX-0003Mj-D9 for submit@debbugs.gnu.org; Tue, 16 Nov 2021 05:10:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmvQX-0001Y7-95 for guix-patches@gnu.org; Tue, 16 Nov 2021 05:10:57 -0500 Received: from [2a00:1450:4864:20::335] (port=52047 helo=mail-wm1-x335.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmvQR-0006oh-QI for guix-patches@gnu.org; Tue, 16 Nov 2021 05:10:56 -0500 Received: by mail-wm1-x335.google.com with SMTP id z200so16392857wmc.1 for ; Tue, 16 Nov 2021 02:10:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fa89j6TUgPDYEkSByPtZj/A4Gya1GurwrtdSNVk+fkE=; b=MkUBz3bVK6BGB69PYkqx2ZfRXDNx1IElhBxaS+Lfxu3SUCWSB+O4DKnj7GTcXmP+Qx cs8ozrk5NaLMs3s/XtUfKwnXcdO3AACP5/97dDDbENRR/GTklEpn5tACe+IQ6xDTKbUb XQjztXITbyjYos3kYifTy3QE+tw30lb5zAwmix/4pXEXAOvZUg3ZyghuxEoORYwmpFqL KTaguoPwqejsJpXk8+lnoE5px8mtSYZNRKKLOoqvWlVhuNMg/U8uLRJ6cYRaNFLknwHf 0G6kYvzPgN3g6VDiVY0qkDzt7CR6GxpbgBqbhCo24N8tdxi48Z8xlNyivB5o2OXz0MS5 fd9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fa89j6TUgPDYEkSByPtZj/A4Gya1GurwrtdSNVk+fkE=; b=QuW6ylfFQlw3dPFhEkqhD7b9RzKNPWkE6yjkVKL0fx52Rv1Qyj01L85gT6ihgPEGUV KPY0S6QoQif3ePJ9VfNtD3k349qVX5NIcijYNCK7oihlbqL7uuqb03sSb6Vpex2ezgql VnLxI70vJWSyDZFtE/YLgjgI6ZKph6a4Kwqq8AdUm6vzd1RNtVora01XPenbmhgijo4i hbc+sGwbVilKbwMQtrCm5a0iI8VKiv6Hy6RJjwKEAT5LzPB6e1wBeqf4myT0729Vw/YS JIaaOM56Z4xZXaX6+CummY2/V4a06hCskdnCvJEn6kmk9+QG4fJ8FQFZOgH/X4/ig62V RB9A== X-Gm-Message-State: AOAM531n8UEitFVWFYcTIwAW85mC8ThbUJchDuglExmd0KwEMjMpG5Yy Rp3eogc3OHfdAbJA2hyUiXjORssthKM= X-Google-Smtp-Source: ABdhPJwwk+V3NNziGlqRNqfHO4VxWCT4KgBsmQsdFA0m6ecqPkRFFQbL1k75CLHNlH8kZ2RqqkTAjQ== X-Received: by 2002:a05:600c:190b:: with SMTP id j11mr6223874wmq.112.1637057449855; Tue, 16 Nov 2021 02:10:49 -0800 (PST) Received: from localhost.localdomain ([193.48.40.110]) by smtp.gmail.com with ESMTPSA id f15sm2410256wmg.30.2021.11.16.02.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Nov 2021 02:10:49 -0800 (PST) From: zimoun To: guix-patches@gnu.org Subject: [PATCH 0/1] import: opam: Warn instead of leave when fetching fails. Date: Tue, 16 Nov 2021 11:10:43 +0100 Message-Id: <20211116101043.58471-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Debbugs-CC: julien@lepiller.eu Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::335 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, It is possible to use another OPAM repository when importing, for instance "guix import opam --repo=https://coq.inria.fr/opam/released" -- although Coq packages are generally not built using OCaml or Dune build-system, another story. :-) Or even, a package using OCaml or Dune build system but not included in Opam repositories supported by Guix. However, if this package uses OCaml or Dune build system, then 'refresh' leaves which is annoying. For instance, consider: --8<---------------cut here---------------start------------->8--- $ guix lint -L /tmp/pkgs example /tmp/pkgs/mine.scm:8:2: example@0 : champ de licence invalide /tmp/pkgs/mine.scm:23:14: example@0 : le synopsis ne devrait pas commencer par un nom de paquet /tmp/pkgs/mine.scm:22:15: example@0 : Erreur de certificat TLS : X.509 server certificate for 'exmaple.org' does not match: C=US,ST=California,L=test,O=testexample,OU=testexample,CN=testexp guix lint: erreur : le paquet « example » est introuvable --8<---------------cut here---------------end--------------->8--- The trivial patch instead turns this error to a warning which allows to run all the checkers: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix lint -L /tmp/pkgs example /tmp/pkgs/mine.scm:8:2: example@0: invalid license field /tmp/pkgs/mine.scm:23:14: example@0: synopsis should not start with the package name /tmp/pkgs/mine.scm:22:15: example@0: TLS certificate error: X.509 server certificate for 'exmaple.org' does not match: C=US,ST=California,L=test,O=testexample,OU=testexample,CN=testexp guix lint: warning: opam: package 'example' not found /tmp/pkgs/mine.scm:12:6: warning: failed to fetch Git repository for example /tmp/pkgs/mine.scm:12:6: example@0: updater 'opam' failed to find upstream releases /tmp/pkgs/mine.scm:12:6: example@0: scheduled Software Heritage archival --8<---------------cut here---------------end--------------->8--- here 'archival'. Note that the failure is correctly handled by 'lint' when the early leave skips. Note that it could be better that 'opam-fetch' raises an error in order to be catched by caller and thus make all the UI consistent. However, this requires a revamp of all inporters... Cheers, simon Example of file /tmp/pkgs/mine.scm: --8<---------------cut here---------------start------------->8--- (define-module (mine) #:use-module (guix packages) #:use-module (guix build-system ocaml) #:use-module (guix git-download)) (define-public example (package (name "example") (version "0") (source (origin (method git-fetch) (uri (git-reference (url "https://example.org") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0m5si9dsv96z92gy4xaqz8mzyz8zp7j1sp542l0wzsp5xgyfpc7i")))) (build-system ocaml-build-system) (home-page "https://exmaple.org") (synopsis "Example") (description "This is an exmaple.") (license #f))) --8<---------------cut here---------------end--------------->8--- zimoun (1): import: opam: Warn instead of leave when fetching fails. guix/import/opam.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 122396075f12b013b6bde56dafb895587b95bc9d -- 2.32.0