From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0HOkNU9xWGFJHgEAgWs5BA (envelope-from ) for ; Sat, 02 Oct 2021 16:48:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id wOE7MU9xWGG4WQAAB5/wlQ (envelope-from ) for ; Sat, 02 Oct 2021 14:48:47 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8D582311C2 for ; Sat, 2 Oct 2021 16:48:47 +0200 (CEST) Received: from localhost ([::1]:53698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWgJi-0001n9-NR for larch@yhetil.org; Sat, 02 Oct 2021 10:48:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWgJZ-0001mw-2Z for guix-devel@gnu.org; Sat, 02 Oct 2021 10:48:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54384) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWgJY-00024D-RR; Sat, 02 Oct 2021 10:48:36 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36490 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWgJY-0004DP-Gq; Sat, 02 Oct 2021 10:48:36 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Mathieu Othacehe Subject: Re: guix weather -m etc/sources-manifest.scm and CI? References: <87a6k39hc1.fsf@gnu.org> <86h7eb58si.fsf@gmail.com> <87tui4c2an.fsf@gnu.org> <87r1d5ozip.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 11 =?utf-8?Q?Vend=C3=A9miaire?= an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 02 Oct 2021 16:48:34 +0200 In-Reply-To: <87r1d5ozip.fsf@gnu.org> (Mathieu Othacehe's message of "Fri, 01 Oct 2021 09:38:54 +0000") Message-ID: <87sfxjwkhp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633186127; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=Tqhgk4U8lRGed/RAIVdGOvx+w679dnWkbO2JP/gdEHo=; b=dQgtZe2gj2iM2cgmiOzxi/XmxS0Qnb9HeYCVu5PTWos9pScTw+Rpyi60k+X/uV2BL/hheY WECDZVPWpqPLiEeOYj0bKWjJtL++BVXjpVwNXlADgUj9UPbZluFNiy4HOV2p1dYSCFp5it xMyThrTcrCRsFZ9gHRs4sjNLmWRXct+dv5vSB7yf9uSeLCEqk7VakfkyvtN6qAty915ADT RAwtkeQhM/TBriKIIWocLXLgYgvzd2Ek0j8xIb/o/Vqivz1KPijje9s7njC2CwfHAelusd Jlxh+fR6jPsAWRlxUEeceCmvxGlRdn2NGj5RrJu2x0dtINVfJZIjcvRAbnKlRg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633186127; a=rsa-sha256; cv=none; b=Fc6THBjtrVf0LkJigvrkNksExzWnUcLgd4/qY6X1wTfMLJ+NlH+XPVJFx2Pw28CeuUYcpG xqtkzUFDoHvT93xh3jdKFNMDEj0oHyLnu8hAK7pk03q3BB49hb5fbqqrUflEks6k55mxNH J/gvYdBDjFk+PXj74kmQJspQwAi9A7frOIRz5lXEt10gEo0QFyg/x4lD47TvWL9nRFQsoK nmh3iVxL2s+7q9l8wpP+2LQZ4mPwzWwE7oZS4YrThaOstkMA6RWbcHV0KxpZ/PT/JgjN0/ 245vqR+DOxhc133UXflGS1z5nGX/KldODECEk62z2AQaUnLWtDFX92ku5bHzwQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -1.90 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 8D582311C2 X-Spam-Score: -1.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: Q7bX+Po6df2P --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Mathieu Othacehe skribis: > The issue is that (gnu ci) expects manifests of packages and not > manifests of origins. Hence, the "job-name" procedure that calls > "package-name" on an origin fails. Ah, silly me. > We could maybe generalize the manifests->packages to support packages > and origins. The package-job procedure would also need some adjustment > to call origin->derivation instead of package-derivation. How about this change? That will create jobs for manifests containing any kind of file-like object. Thanks! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/gnu/ci.scm b/gnu/ci.scm index ceb1b94af9..e1011355db 100644 --- a/gnu/ci.scm +++ b/gnu/ci.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright =C2=A9 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 = Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2012-2021 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2017, 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright =C2=A9 2018, 2019 Cl=C3=A9ment Lassieur ;;; Copyright =C2=A9 2020 Julien Lepiller @@ -86,7 +86,7 @@ (define* (derivation->job name drv #:key (max-silent-time 3600) - (timeout 3600)) + (timeout (* 5 3600))) "Return a Cuirass job called NAME and describing DRV. =20 MAX-SILENT-TIME and TIMEOUT are build options passed to the daemon when @@ -443,19 +443,40 @@ valid." (map channel-url channels))) arguments)) =20 -(define (manifests->packages store manifests) - "Return the list of packages found in MANIFESTS." +(define (manifests->jobs store manifests) + "Return the list of jobs for the entries in MANIFESTS, a list of file +names." (define (load-manifest manifest) (save-module-excursion (lambda () (set-current-module (make-user-module '((guix profiles) (gnu)))) (primitive-load manifest)))) =20 - (delete-duplicates! - (map manifest-entry-item - (append-map (compose manifest-entries - load-manifest) - manifests)))) + (define (manifest-entry-job-name entry) + (string-append (manifest-entry-name entry) "-" + (manifest-entry-version entry))) + + (define (manifest-entry->job entry) + (let* ((obj (manifest-entry-item entry)) + (drv (parameterize ((%graft? #f)) + (run-with-store store + (lower-object obj)))) + (max-silent-time (or (and (package? obj) + (assoc-ref (package-properties obj) + 'max-silent-time)) + 3600)) + (timeout (or (and (package? obj) + (assoc-ref (package-properties obj) 'timeout)) + (* 5 3600)))) + (derivation->job (manifest-entry-job-name entry) drv + #:max-silent-time max-silent-time + #:timeout timeout))) + + (map manifest-entry->job + (delete-duplicates + (append-map (compose manifest-entries load-manifest) + manifests) + manifest-entry=3D?))) =20 (define (arguments->systems arguments) "Return the systems list from ARGUMENTS." @@ -568,12 +589,8 @@ valid." packages))) (('manifests . rest) ;; Build packages in the list of manifests. - (let* ((manifests (arguments->manifests rest channels)) - (packages (manifests->packages store manifests))) - (map (lambda (package) - (package-job store (job-name package) - package system)) - packages))) + (let ((manifests (arguments->manifests rest channels))) + (manifests->jobs store manifests))) (else (error "unknown subset" subset)))) systems))) --=-=-=--