From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 01 10:19:36 2021 Received: (at 50515) by debbugs.gnu.org; 1 Oct 2021 14:19:36 +0000 Received: from localhost ([127.0.0.1]:56804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWJNv-0005Q1-Vu for submit@debbugs.gnu.org; Fri, 01 Oct 2021 10:19:36 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:47022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWJNr-0005Pl-Hl for 50515@debbugs.gnu.org; Fri, 01 Oct 2021 10:19:34 -0400 Received: by mail-wr1-f41.google.com with SMTP id k7so15636718wrd.13 for <50515@debbugs.gnu.org>; Fri, 01 Oct 2021 07:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-transfer-encoding; bh=ZQ6x5xq+7Ip5nBTrKiVPFp9KEio7vzsVTNoKUXhQiGs=; b=T01zpNi5wBuHtvoORWwFKN18sE14h7GnjWQg/FCDK2HaRaL+dOSj4OI6QB9TkygtCm 6+HPVi6mE2v/Ve6jvbIMMnj1OS3uOUWoFTiUk+FR9lDLojpY59IzouVt8Z6Mb/CiEJtt lvYEygQWm+yhM7nxNDExZh4HYii7hySUSBgJqOBA3bMxKoQBfsJcP7W7AbZ0AQ31aThm Rw/JyP4bbm1ey6gVk73MyYxm0DA5Xi+KqLOXp+NTP3uUNw1KBWPEq3vTebgclL/q6UxW 5Dh8b23Q/UE+rbsHYrWw+L77eh/9YE21pZt9VRuvliEVpuvqXrJ0lkZvCWEfUQj89Ko2 PK1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=ZQ6x5xq+7Ip5nBTrKiVPFp9KEio7vzsVTNoKUXhQiGs=; b=XcwmGAARDjpHzz1L8mDFVhR4eJFqYR/luIy1Enqhph+9R/BYy2JMXHlIC3RpfYMhwQ OoqxLp69UAJFRv1JjNMNN9zPNmfG8RhCjYuSF8RjRBu8C/jN4i98HbasInbEXwLxtw+q B8KRg1gGbdsNAizgVQqhP5PUSD5QQtuBONCsNBxm4mu8znR5CMN7uJawdKS2LqI/zmqa 8MWtkOVH1W3UJcHDjsQyrYASLroK1QY2D8aHU6cuQhIx95x6ckkwjtXcWbmCyEKAV0Wz xMcL1wKbfM3h2ei5Z+Kr9DZOWbuKbvb9HyU8t6MkLU4x+279XjhWUHqMtNoQu08DYdz/ visw== X-Gm-Message-State: AOAM530fBAgMJn9h7Dg834rBjVxnA1ynBlpjPD2WMrz2cpxEw3B8F5wu EcYb0nf++ssWMbdt/bh563Y= X-Google-Smtp-Source: ABdhPJwr/kzs+ZMMVTZfXQtoCTMOW5UKTEmmkNtDOyu9p6fzoKUl1kgPhfI1CkZdIvuVJ4yaf03maw== X-Received: by 2002:adf:ab19:: with SMTP id q25mr3330747wrc.64.1633097965570; Fri, 01 Oct 2021 07:19:25 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id h11sm5267457wru.10.2021.10.01.07.19.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 07:19:25 -0700 (PDT) From: zimoun To: 50515@debbugs.gnu.org, ludo@gnu.org Subject: Re: [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'. References: <20210911002608.14074-1-zimon.toutoune@gmail.com> <20210911002608.14074-2-zimon.toutoune@gmail.com> Date: Fri, 01 Oct 2021 16:16:16 +0200 In-Reply-To: <20210911002608.14074-2-zimon.toutoune@gmail.com> (zimoun's message of "Sat, 11 Sep 2021 02:26:08 +0200") Message-ID: <86wnmwakzz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50515 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: -1.0 (-) Hi, Thanks for 50620. However, because the package guix had not been updated in the same time =E2=80=93 see [2/2] of 50620 =E2=80=93 it makes co= nvoluted to avoid: --8<---------------cut here---------------start------------->8--- ERROR: In procedure %resolve-variable: error: computed-origin-method: unbound variable --8<---------------cut here---------------end--------------->8--- The package guix supports the previous location and as soon as it will be updated the new location will be effective. Because I am not convinced that people (at least me) will track that; to make it work with both locations means something along these lines: --8<---------------cut here---------------start------------->8--- (define computed-origin-method? (catch #t (lambda _ (define computed-origin-method (@@ (guix packages) computed-origin-method)) (lambda (method) (eq? method computed-origin-method))) (lambda _ (lambda (method) (or (eq? method (@@ (gnu packages linux) computed-origin-method)) (eq? method (@@ (gnu packages gnuzilla) computed-origin-metho= d))))))) (if (computed-origin-method? method) ;; Packages in gnu/packages/gnuzilla.scm and gnu/packages/linux.scm ;; represent their 'uri' as 'promise'. (match uri ((? promise? promise) [...] ;;Regular packages represent 'uri' as string. `((type . ,(cond ((or (eq? url-fetch method) [...] --8<---------------cut here---------------end--------------->8--- Update the package guix reduces to just: --8<---------------cut here---------------start------------->8--- (if (eq? method (@@ (guix packages) computed-origin-method)) ;; Packages in gnu/packages/gnuzilla.scm and gnu/packages/linux.scm ;; represent their 'uri' as 'promise'. (match uri ((? promise? promise) [...] ;;Regular packages represent 'uri' as string. `((type . ,(cond ((or (eq? url-fetch method) [...] --8<---------------cut here---------------end--------------->8--- which had been the original aim of 50620. Could you please update the package guix? See [2/2] of 50620. :-) Or do I miss something? Cheers, simon