GNU bug report logs - #68935
[PATCH 0/3] Add 'put' option to guix import.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Herman Rimm <herman@HIDDEN>; Keywords: patch; dated Mon, 5 Feb 2024 14:52:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 68935 <at> debbugs.gnu.org:


Received: (at 68935) by debbugs.gnu.org; 16 Feb 2024 16:07:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 16 11:07:01 2024
Received: from localhost ([127.0.0.1]:60007 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rb0jt-0008Se-Ct
	for submit <at> debbugs.gnu.org; Fri, 16 Feb 2024 11:07:01 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:38893
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1rb0jn-0008SJ-5u
 for 68935 <at> debbugs.gnu.org; Fri, 16 Feb 2024 11:06:59 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1708099588;
 h=from:from: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;
 bh=lNSc43+XZzrMQlp/BbQMKjkx4qoRKAGT0fpdUDZm5Eg=;
 b=qcWWo8LWSmjB3FuUeU4h2gja6fl9zyicMoMH82QWayj7kkBZu11PssG+7AnE2vw0uLEd7M
 Z3G6g+CztvPyWFcMXOsTXZtSoF1Oip4huVLjbInXDQMUJ0XLNtXoyy7LAxYdL+5Y5CBs96
 yKJ12fbVgesLsDxvR6ECMnGRAcCYCxNJGr/BgSSLyHjFHaB8iGxoYwDgsGJchIvBDRHrSZ
 K/a5iSyOx4jUYQvP7FvUjuPrdMlPsbj7QAtUKQvbbikWSnDeg8lCg8kkZ9SjiLy1SvDzXT
 wT+0fSfAebFUN02sTTCmMTlKeh7Vx9Gi88YTz+zsvckl9lOsBwZAPxWHz5zPDA==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 9a16d759
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Fri, 16 Feb 2024 16:06:28 +0000 (UTC)
Date: Fri, 16 Feb 2024 17:06:22 +0100
From: Herman Rimm <herman@HIDDEN>
To: 68935 <at> debbugs.gnu.org
Subject: [PATCH v2 5/6] import: Insert packages into modules alphabetically.
Message-ID: <bv7ivnhlqex75ygaihdvqeegl27as6axrfskkmt754cw6y2spy@zgfyuzkiwfco>
References: <3c0da641938e96a9f0c491abb74b30c75634df9a.1707505804.git.herman@HIDDEN>
 <c14cf3064d0b349f0947583b4b7a9ab63d4785af.1707505804.git.herman@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <c14cf3064d0b349f0947583b4b7a9ab63d4785af.1707505804.git.herman@HIDDEN>
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi, On Fri, Feb 09, 2024 at 08:25:17PM +0100, Herman Rimm
 wrote: > + ((or ("-i" module importer args ...) > + ("--insert" module
 importer
 args ...)) > + (let ((find-and-insert > + (lambda (expr) > + (let [...] 
 Content analysis details:   (1.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
 0.0 TVD_RCVD_IP            Message was received from an IP address
 3.3 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
 [81.205.150.117 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 68935
Cc: ludo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.4 (/)

Hi,

On Fri, Feb 09, 2024 at 08:25:17PM +0100, Herman Rimm wrote:
> +    ((or ("-i" module importer args ...)
> +         ("--insert" module importer args ...))
> +     (let ((find-and-insert
> +             (lambda (expr)
> +               (let ((insert
> +                       (lambda (source-properties)
> +                         (if source-properties
> +                          (insert-expression source-properties expr)
> +                          (let ((port (open-file file "a")))
It should be 'module' instead of 'file' here. I will rename 'module' to
'file' in the next revision though.

Cheers,
Herman




Information forwarded to guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.

Message received at 68935 <at> debbugs.gnu.org:


Received: (at 68935) by debbugs.gnu.org; 10 Feb 2024 15:25:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 10 10:25:16 2024
Received: from localhost ([127.0.0.1]:48778 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rYpEA-0005Fj-ND
	for submit <at> debbugs.gnu.org; Sat, 10 Feb 2024 10:25:15 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:51833
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1rYowm-0004VC-1d
 for 68935 <at> debbugs.gnu.org; Sat, 10 Feb 2024 10:07:17 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1707577613;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=op7bF8F1b1OTwSeokEUg8hn+kRNWkcf7ZjC40gFNidI=;
 b=r6S2c8QIxEqgRHIhsMKmYJKA6MvC0bHuo8qZgI9eUAaz4rffCMftXXSv34ZKD9Jvgg988P
 LDe9e6pEcsMeu7sXnZy4ygJflBbmsEwZB+JE6YOYD9rOAjtRegi0K8S6+DvI97mVTtFxQZ
 NH8uEeFa/W818BTQCS9weTXYPHcPzuySRNnunTbTrgMkWbwTF+Yd2Pfs7cLemFapidZbIE
 Ev2gGedslUVkNkFJyRHrsF9rl8eidudIbYcyPLs9t8qr0mLzMHB6vgq6crcIwFaKF2khUi
 K5DO/BmrSruQ8vg64NmAa1blRW5FU1CBsdhDZ0ZvHYgZ6QFYp3IiLGjKtNT2Bw==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id e67dc082
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Sat, 10 Feb 2024 15:06:53 +0000 (UTC)
Date: Sat, 10 Feb 2024 16:06:49 +0100
From: Herman Rimm <herman@HIDDEN>
To: 68935 <at> debbugs.gnu.org
Subject: Re: [PATCH v2 5/6] import: Insert packages into modules
 alphabetically.
Message-ID: <hh3hzsvmnxieyypisfu4dwqqk4vehzq5xi75loxo22kd5tkrdp@rxmbjtb2ruqd>
References: <3c0da641938e96a9f0c491abb74b30c75634df9a.1707505804.git.herman@HIDDEN>
 <c14cf3064d0b349f0947583b4b7a9ab63d4785af.1707505804.git.herman@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <c14cf3064d0b349f0947583b4b7a9ab63d4785af.1707505804.git.herman@HIDDEN>
X-Spam-Score: 3.5 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi, On Fri, Feb 09, 2024 at 08:25:17PM +0100, Herman Rimm
 wrote: > diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm >
 index 77fcfe3990..850887e720 100644 > --- a/guix/scripts/import.scm > ++ [...]
 Content analysis details:   (3.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 TVD_RCVD_IP            Message was received from an IP address
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
 [81.205.150.117 listed in zen.spamhaus.org]
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 68935
Cc: ludo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Hi, On Fri, Feb 09, 2024 at 08:25:17PM +0100, Herman Rimm
   wrote: > diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm >
   index 77fcfe3990..850887e720 100644 > --- a/guix/scripts/import.scm > ++ [...]
    
 
 Content analysis details:   (2.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                             [81.205.150.117 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

Hi,

On Fri, Feb 09, 2024 at 08:25:17PM +0100, Herman Rimm wrote:
> diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm
> index 77fcfe3990..850887e720 100644
> --- a/guix/scripts/import.scm
> +++ b/guix/scripts/import.scm
> @@ -67,10 +67,39 @@ (define (show-help)
>    (display (G_ "
>    -h, --help             display this help and exit"))
>    (display (G_ "
> +  -i, --insert           insert into package module alphabetically"))
> +  (display (G_ "
>    -V, --version          display version information and exit"))
>    (newline)
>    (show-bug-report-information))
>  
> +(define (define-import importer args proc)
> +  "Wrap package expressions from IMPORTER with 'define-public and invoke
> +PROC callback."
> +  (if (member importer importers)
> +      (match (apply (resolve-importer importer) args)
> +        ((and expr (or ('package _ ...)
> +                       ('let _ ...)))
> +         (proc (package->definition expr)))
> +        ((and expr ('define-public _ ...))

With doc/package-hello.json file:

  [
    {
      "name": "myhello",
      "version": "2.10",
      "source": "mirror://gnu/hello/hello-2.10.tar.gz",
      "build-system": "gnu",
      "arguments": {
        "tests?": false
      },
      "home-page": "https://www.gnu.org/software/hello/",
      "synopsis": "Hello, GNU world: An example GNU package",
      "description": "GNU Hello prints a greeting.",
      "license": "GPL-3.0+",
      "native-inputs": ["gettext"]
    }
  ]

'guix import json doc/package-hello.json' produces:

  Starting download of /tmp/guix-file.BLTipY
  From https://ftpmirror.gnu.org/gnu/hello/hello-2.10.tar.gz...
  following redirection to `https://mirrors.ibiblio.org/gnu/hello/hello-2.10.tar.gz'...
   …10.tar.gz  709KiB                   1.6MiB/s 00:00 ▕██████████████████▏ 100.0%
  (define-public myhello
    (package
      (name "myhello")
      (version "2.10")
      (source
       (origin
         (method url-fetch)
         (uri (string-append "mirror://gnu/hello/hello-" version ".tar.gz"))
         (sha256
          (base32 "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
      (build-system (@ (guix build-system gnu) gnu-build-system))
      (arguments
       `(#:tests? #f))
      (native-inputs (list (@ (gnu packages gettext) gnu-gettext)))
      (home-page "https://www.gnu.org/software/hello/")
      (synopsis "Hello, GNU world: An example GNU package")
      (description "GNU Hello prints a greeting.")
      (license license:gpl3+)))
  
  Backtrace:
             4 (primitive-load "/home/herman/.cache/guix/inferiors/umi…")
  In guix/ui.scm:
     2324:7  3 (run-guix . _)
    2287:10  2 (run-guix-command _ . _)
  In srfi/srfi-1.scm:
      634:9  1 (for-each #<procedure 7f31b8f81380 at guix/scripts/imp…> …)
  In guix/scripts/import.scm:
      88:21  0 (_ _)
  
  guix/scripts/import.scm:88:21: Throw to key `match-error' with args `("match" "no matching pattern" myhello)'.

I think I can remove the (myhello) variable expression after definition
from the JSON importer in a future revision. Just a heads up.

Also I provided a reduced package-hello.json, because after fixing the
comma syntax, importing the file gives:

  Starting download of /tmp/guix-file.dVsYSt
  From https://ftpmirror.gnu.org/gnu/hello/hello-2.10.tar.gz...
  following redirection to `https://mirrors.ibiblio.org/gnu/hello/hello-2.10.tar.gz'...
   …10.tar.gz  709KiB                   1.5MiB/s 00:00 ▕██████████████████▏ 100.0%
  
  Starting download of /tmp/guix-file.B2wURN
  From https://example.com/greeter-1.0.tar.gz...
  download failed "https://example.com/greeter-1.0.tar.gz" 404 "Not Found"
  
  Starting download of /tmp/guix-file.B2wURN
  From https://web.archive.org/web/20240210155936/https://example.com/greeter-1.0.tar.gz...
  following redirection to `https://web.archive.org/web/20221219143408/http://example.com/greeter-1.0.tar.gz'...
  download failed "https://web.archive.org/web/20221219143408/http://example.com/greeter-1.0.tar.gz" 404 "Not Found"
  Trying to use Disarchive to assemble /tmp/guix-file.B2wURN...
  could not find its Disarchive specification
  failed to download "/tmp/guix-file.B2wURN" from "https://example.com/greeter-1.0.tar.gz"
  Backtrace:
            13 (primitive-load "/home/herman/.cache/guix/inferiors/umi…")
  In guix/ui.scm:
     2324:7 12 (run-guix . _)
    2287:10 11 (run-guix-command _ . _)
  In guix/scripts/import.scm:
       80:6 10 (guix-import . _)
  In ice-9/boot-9.scm:
    1747:15  9 (with-exception-handler #<procedure 7f890505d3f0 at ic…> …)
  In guix/scripts/import/json.scm:
      91:16  8 (_)
  In ice-9/boot-9.scm:
    1747:15  7 (with-exception-handler #<procedure 7f890505d3c0 at ic…> …)
  In guix/import/json.scm:
      72:19  6 (_)
  In srfi/srfi-1.scm:
     460:18  5 (fold #<procedure 7f890424dd60 at guix/import/json.scm…> …)
  In guix/import/json.scm:
      81:55  4 (_ (("inputs" . #("myhello" "hello")) ("license" . #) …) …)
  In guix/import/utils.scm:
     543:12  3 (alist->package (("inputs" . #("myhello" "hello")) # …) _)
     162:33  2 (source-spec->object "https://example.com/greeter-1.0.t…")
  In ice-9/ports.scm:
     450:11  1 (call-with-input-file #f #<procedure 7f88f0ba9b40 at g…> …)
  In unknown file:
             0 (open-file #f "r" #:encoding #f #:guess-encoding #f)

Can greeter have a real source? What should it be?

Cheers,
Herman Rimm




Information forwarded to guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.

Message received at 68935 <at> debbugs.gnu.org:


Received: (at 68935) by debbugs.gnu.org; 9 Feb 2024 19:26:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 09 14:26:48 2024
Received: from localhost ([127.0.0.1]:60238 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rYWWO-0001a5-D7
	for submit <at> debbugs.gnu.org; Fri, 09 Feb 2024 14:26:48 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:52227
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1rYWWL-0001Ya-33
 for 68935 <at> debbugs.gnu.org; Fri, 09 Feb 2024 14:26:45 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1707506774;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=aU/tInGGOD5RBYNmXV5RWsOeN5B+59LiHAqW7UIBBs4=;
 b=TzJhbMj4LnPtZG2ZcWq/xM7tLhhcFwzI468mkY7//X63mzglh6s6aBURPUbntNf/guN6jW
 pL/8FIY8uSQGHs/dhl5i9WZ8se5cweWliFh9Q9T5ZiqlOQy37z4WQIAdY95vjRpxWSxVgW
 BAR4f+JV6Z39jo3L0tuBEUhblHHCTLkovF+q6oVjrqBuSF84ADQ5PH8F/UCSOZm/+jtvNS
 BfZdU9q7xUDvuXy5ONEqTCPwSjI3LlR1un/H+nuQzqYwGrNZ7CS+yUDbio9sHgfQVV4mTA
 rNbks9ZaSzRS6viV07YwoM9W5uTHLLeG8dSCpoDrxvevRqxJYaHU3AlOr8/Tvg==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id d178b007
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Fri, 9 Feb 2024 19:26:14 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 68935 <at> debbugs.gnu.org
Subject: [PATCH v2 6/6] import: Discard args after --version and --help.
Date: Fri,  9 Feb 2024 20:25:18 +0100
Message-ID: <0faee744258ddfaa689a35a949d8e1674cdfe27d.1707505805.git.herman@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <3c0da641938e96a9f0c491abb74b30c75634df9a.1707505804.git.herman@HIDDEN>
References: <3c0da641938e96a9f0c491abb74b30c75634df9a.1707505804.git.herman@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Christopher Baines <guix@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 3.5 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * guix/scripts/import.scm (guix-import): Discard args.
 Change-Id:
 Icce5cd0daf9011f7ddde7904113b31b547f063ef --- guix/scripts/import.scm | 4
 ++-- 1 file changed, 2 insertions(+),
 2 deletions(-) diff --git a/guix/scripts/import.scm
 b/guix/scripts/import.scm index 850887e720..3d77d1af55 100644 ---
 a/guix/scripts/import.scm
 +++ b/guix/scripts/import.scm @@ -108, 10 +108, 10 @@ (define-command (gu [...]
 Content analysis details:   (3.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
 [81.205.150.117 listed in zen.spamhaus.org]
 0.0 TVD_RCVD_IP            Message was received from an IP address
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 68935
Cc: ludo@HIDDEN, Herman Rimm <herman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * guix/scripts/import.scm (guix-import): Discard args. Change-Id:
    Icce5cd0daf9011f7ddde7904113b31b547f063ef --- guix/scripts/import.scm | 4
    ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/scripts/import.scm
    b/guix/scripts/import.scm index 850887e720..3d77d1af55 100644 --- a/guix/scripts/import.scm
    +++ b/guix/scripts/import.scm @@ -108,10 +108,10 @@ (define-command (gu [...]
    
 
 Content analysis details:   (2.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                             [81.205.150.117 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* guix/scripts/import.scm (guix-import): Discard args.

Change-Id: Icce5cd0daf9011f7ddde7904113b31b547f063ef
---
 guix/scripts/import.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm
index 850887e720..3d77d1af55 100644
--- a/guix/scripts/import.scm
+++ b/guix/scripts/import.scm
@@ -108,10 +108,10 @@ (define-command (guix-import . args)
     (()
      (format (current-error-port)
              (G_ "guix import: missing importer name~%")))
-    ((or ("-h") ("--help"))
+    ((or ("-h" _ ...) ("--help" _ ...))
      (leave-on-EPIPE (show-help))
      (exit 0))
-    ((or ("-V") ("--version"))
+    ((or ("-V" _ ...) ("--version" _ ...))
      (show-version-and-exit "guix import"))
     ((or ("-i" module importer args ...)
          ("--insert" module importer args ...))
-- 
2.41.0





Information forwarded to guix@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, rekado@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.

Message received at 68935 <at> debbugs.gnu.org:


Received: (at 68935) by debbugs.gnu.org; 9 Feb 2024 19:26:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 09 14:26:48 2024
Received: from localhost ([127.0.0.1]:60236 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rYWWN-0001a0-RJ
	for submit <at> debbugs.gnu.org; Fri, 09 Feb 2024 14:26:48 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:51759
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1rYWWK-0001YI-Bs
 for 68935 <at> debbugs.gnu.org; Fri, 09 Feb 2024 14:26:45 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1707506774;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=qxhQEJqZIKomoOppxc2+l6rUODdzvnDtMhWKcvtj1CA=;
 b=Uhr+SwCwYPEuZWSKDFVsSA8G8ivh/7omDOrh9GGNKsbBgZSyIg1CwQaPNyhW2ae/05oLoV
 5+c6hq4LNeeHWaITCL0uApLZnYza/9qmQClRqrtvJLNGqf3WGUPEFwoGY/kCkwLZ/cB4LO
 MTFcGT0cjFdUDKzUzatq9dFUjWzAJtFiaTZoYNBukdmPHIAbbny+2YQNhFx/qyrcRrkUvt
 x1axrtJ0qnzUuhDY7455nujlngHRDI+4jiNNszZOApuJnFvv2kFIdLj0S/aU7hTKsZtz6m
 Zo+HwIMsR6ee+L6k9G34DiOFdp+qUH+p9FopWOrfRLeWxXYxHnqo2qkLJlR2uQ==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id e19af69d
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Fri, 9 Feb 2024 19:26:14 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 68935 <at> debbugs.gnu.org
Subject: [PATCH v2 5/6] import: Insert packages into modules alphabetically.
Date: Fri,  9 Feb 2024 20:25:17 +0100
Message-ID: <c14cf3064d0b349f0947583b4b7a9ab63d4785af.1707505804.git.herman@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <3c0da641938e96a9f0c491abb74b30c75634df9a.1707505804.git.herman@HIDDEN>
References: <3c0da641938e96a9f0c491abb74b30c75634df9a.1707505804.git.herman@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Christopher Baines <guix@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 3.5 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * guix/scripts/import.scm (guix-import): Add 'insert' option.
 (define-import): Add procedure. * doc/guix.texi (Invoking guix import):
 Describe
 'insert' option. Change-Id: Id021095355283ade79acde120890eb2ce9173cf7 ---
 doc/guix.texi | 14 ++++++-- guix/scripts/import.scm | 80
 ++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 31 deleti [...] 
 Content analysis details:   (3.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
 [81.205.150.117 listed in zen.spamhaus.org]
 0.0 TVD_RCVD_IP            Message was received from an IP address
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 68935
Cc: ludo@HIDDEN, Herman Rimm <herman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * guix/scripts/import.scm (guix-import): Add 'insert' option.
    (define-import): Add procedure. * doc/guix.texi (Invoking guix import): Describe
    'insert' option. Change-Id: Id021095355283ade79acde120890eb2ce9173cf7 ---
    doc/guix.texi | 14 ++++++-- guix/scripts/import.scm | 80 ++++++++++++++++++++++++++
    2 files changed, 63 insertions(+), 31 deleti [...] 
 
 Content analysis details:   (2.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                             [81.205.150.117 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* guix/scripts/import.scm (guix-import): Add 'insert' option.
(define-import): Add procedure.
* doc/guix.texi (Invoking guix import): Describe 'insert' option.

Change-Id: Id021095355283ade79acde120890eb2ce9173cf7
---
 doc/guix.texi           | 14 ++++++--
 guix/scripts/import.scm | 80 ++++++++++++++++++++++++++---------------
 2 files changed, 63 insertions(+), 31 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 2908085c36..c73db5cbbf 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -124,6 +124,7 @@
 Copyright @copyright{} 2023 Saku Laesvuori@*
 Copyright @copyright{} 2023 Graham James Addis@*
 Copyright @copyright{} 2023 Tomas Volf@*
+Copyright @copyright{} 2024 Herman Rimm@*
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -14178,12 +14179,21 @@ Invoking guix import
 The general syntax is:
 
 @example
-guix import @var{importer} @var{options}@dots{}
+guix import [@var{global-options}@dots{}] @var{importer} @var{package} [@var{options}@dots{}]
 @end example
 
 @var{importer} specifies the source from which to import package
 metadata, and @var{options} specifies a package identifier and other
-options specific to @var{importer}.
+options specific to @var{importer}. @command{guix import} itself has the
+following @var{global-options}:
+
+@table @code
+@item --insert=@var{file}
+@itemx -i @var{file}
+Insert the package definition(s) that the @var{importer} generated into the
+specified @var{file}, either in alphabetical order among existing package
+definitions, or at the end of the file otherwise.
+@end table
 
 Some of the importers rely on the ability to run the @command{gpgv} command.
 For these, GnuPG must be installed and in @code{$PATH}; run @code{guix install
diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm
index 77fcfe3990..850887e720 100644
--- a/guix/scripts/import.scm
+++ b/guix/scripts/import.scm
@@ -67,10 +67,39 @@ (define (show-help)
   (display (G_ "
   -h, --help             display this help and exit"))
   (display (G_ "
+  -i, --insert           insert into package module alphabetically"))
+  (display (G_ "
   -V, --version          display version information and exit"))
   (newline)
   (show-bug-report-information))
 
+(define (define-import importer args proc)
+  "Wrap package expressions from IMPORTER with 'define-public and invoke
+PROC callback."
+  (if (member importer importers)
+      (match (apply (resolve-importer importer) args)
+        ((and expr (or ('package _ ...)
+                       ('let _ ...)))
+         (proc (package->definition expr)))
+        ((and expr ('define-public _ ...))
+         (proc expr))
+        ((? list? expressions)
+         (for-each (lambda (expr)
+                     (match expr
+                       ((and expr (or ('package _ ...)
+                                      ('let _ ...)))
+                        (proc (package->definition expr)))
+                       ((and expr ('define-public _ ...))
+                        (proc expr))))
+                   expressions))
+        (x
+         (leave (G_ "'~a' import failed~%") importer)))
+      (let ((hint (string-closest importer importers #:threshold 3)))
+        (report-error (G_ "~a: invalid importer~%") importer)
+        (when hint
+          (display-hint (G_ "Did you mean @code{~a}?~%") hint))
+        (exit 1))))
+
 (define-command (guix-import . args)
   (category packaging)
   (synopsis "import a package definition from an external repository")
@@ -84,33 +113,26 @@ (define-command (guix-import . args)
      (exit 0))
     ((or ("-V") ("--version"))
      (show-version-and-exit "guix import"))
+    ((or ("-i" module importer args ...)
+         ("--insert" module importer args ...))
+     (let ((find-and-insert
+             (lambda (expr)
+               (let ((insert
+                       (lambda (source-properties)
+                         (if source-properties
+                          (insert-expression source-properties expr)
+                          (let ((port (open-file file "a")))
+                            (pretty-print-with-comments port expr)
+                            (newline port)
+                            (close-port port))))))
+                 (find-expression module expr insert)))))
+       (define-import importer args find-and-insert)))
     ((importer args ...)
-     (if (member importer importers)
-         (let ((print (lambda (expr)
-                        (leave-on-EPIPE
-                         (pretty-print-with-comments (current-output-port) expr)))))
-           (match (apply (resolve-importer importer) args)
-             ((and expr (or ('package _ ...)
-                            ('let _ ...)))
-              (print (package->definition expr)))
-             ((and expr ('define-public _ ...))
-              (print expr))
-             ((? list? expressions)
-              (for-each (lambda (expr)
-                          (match expr
-                            ((and expr (or ('package _ ...)
-                                           ('let _ ...)))
-                             (print (package->definition expr)))
-                            ((and expr ('define-public _ ...))
-                             (print expr)))
-                          ;; Two newlines: one after the closing paren, and
-                          ;; one to leave a blank line.
-                          (newline) (newline))
-                        expressions))
-             (x
-              (leave (G_ "'~a' import failed~%") importer))))
-         (let ((hint (string-closest importer importers #:threshold 3)))
-           (report-error (G_ "~a: invalid importer~%") importer)
-           (when hint
-             (display-hint (G_ "Did you mean @code{~a}?~%") hint))
-           (exit 1))))))
+     (let ((print (lambda (expr)
+                    (leave-on-EPIPE
+                      (pretty-print-with-comments
+                        (current-output-port) expr)
+                      ;; Two newlines: one after the closing paren, and
+                      ;; one to leave a blank line.
+                      (newline) (newline)))))
+       (define-import importer args print)))))
-- 
2.41.0





Information forwarded to guix@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, rekado@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.

Message received at 68935 <at> debbugs.gnu.org:


Received: (at 68935) by debbugs.gnu.org; 9 Feb 2024 19:26:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 09 14:26:47 2024
Received: from localhost ([127.0.0.1]:60234 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rYWWN-0001Zp-Ee
	for submit <at> debbugs.gnu.org; Fri, 09 Feb 2024 14:26:47 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:52227
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1rYWWK-0001Ya-8O
 for 68935 <at> debbugs.gnu.org; Fri, 09 Feb 2024 14:26:44 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1707506774;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=iglSg6lJSvpt1mvW6yDKA1v6LBrFqLDh2JD8IjI932s=;
 b=MRNR7yIGmS53WTOZ9vhbX4SwkOYaON7jlqqfRJz8gbeGb3QdQkvIhb4/viH3aoyL9uwUXb
 qd/WgKIRGo5h4L5687gQZSbAb9GlvsZ3FXbvrLxSubuYGbVb20vR2Q3WFO+gHwVydvsvHp
 wxfF6TsWycGiu/otX9xJi+V2icq+C8aQflH6eFkFXmw2R/xuhRBVu9bsoux+xcTdj8Mpko
 vpBrcV2EyOVoA2Th+lav1Bpu6XEzd6qlLwEgJOTpDs217sALrFokXHBPxHsNH5G64IEtAH
 xBCvxdJ8hs66KvBqZ92N2DOsUX4ugKPmiKpvO+weP4oX/ZF6gvIPLq901YFpTA==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id a31a6ace
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Fri, 9 Feb 2024 19:26:14 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 68935 <at> debbugs.gnu.org
Subject: [PATCH v2 4/6] utils: Add find-expression procedure.
Date: Fri,  9 Feb 2024 20:25:16 +0100
Message-ID: <028a3d700965947fa0547eb17d4894b8302eb67c.1707505804.git.herman@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <3c0da641938e96a9f0c491abb74b30c75634df9a.1707505804.git.herman@HIDDEN>
References: <3c0da641938e96a9f0c491abb74b30c75634df9a.1707505804.git.herman@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Christopher Baines <guix@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 3.5 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * guix/utils.scm (find-expression): Add and export procedure.
 * tests/utils.scm ("find-expression"): Add test. Change-Id:
 Ie209df39c1f006b20aa6436fb1aef4c84b1694ee
 --- guix/utils.scm | 24 ++++++++++++++++++++++++ tests/utils.scm | 16
 ++++++++++++++++ 2 files changed, 40 insertions(+) 
 Content analysis details:   (3.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
 [81.205.150.117 listed in zen.spamhaus.org]
 0.0 TVD_RCVD_IP            Message was received from an IP address
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 68935
Cc: ludo@HIDDEN, Herman Rimm <herman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * guix/utils.scm (find-expression): Add and export procedure.
    * tests/utils.scm ("find-expression"): Add test. Change-Id: Ie209df39c1f006b20aa6436fb1aef4c84b1694ee
    --- guix/utils.scm | 24 ++++++++++++++++++++++++ tests/utils.scm | 16 ++++++++++++++++
    2 files changed, 40 insertions(+) 
 
 Content analysis details:   (2.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                             [81.205.150.117 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* guix/utils.scm (find-expression): Add and export procedure.
* tests/utils.scm ("find-expression"): Add test.

Change-Id: Ie209df39c1f006b20aa6436fb1aef4c84b1694ee
---
 guix/utils.scm  | 24 ++++++++++++++++++++++++
 tests/utils.scm | 16 ++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/guix/utils.scm b/guix/utils.scm
index 8f0bc2399e..315feeb232 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -148,6 +148,7 @@ (define-module (guix utils)
             edit-expression
             delete-expression
             insert-expression
+            find-expression
 
             filtered-port
             decompressed-port
@@ -513,6 +514,29 @@ (define (insert-expression source-properties expr)
                    (string-append expr "\n\n" str))))
     (edit-expression source-properties insert)))
 
+(define (find-expression file expr proc)
+  "Search in FILE for a top-level expression which alphabetically
+succeeds EXPR. Call PROC with the location if found, or with #f
+otherwise."
+  (let* ((name (match expr
+                 (('define-public symbol _ ...)
+                  (symbol->string symbol))))
+         (source-properties
+           (call-with-input-file
+             file
+             (lambda (port)
+               (do ((syntax (read-syntax port)
+                            (read-syntax port)))
+                 ((match (syntax->datum syntax)
+                    (('define-public symbol _ ...)
+                     (string> (symbol->string symbol)
+                              name))
+                    ((? eof-object?) #t)
+                    (_ #f))
+                  (if (eof-object? syntax)
+                    #f (syntax-source syntax))))))))
+    (proc source-properties)))
+
 
 ;;;
 ;;; Keyword arguments.
diff --git a/tests/utils.scm b/tests/utils.scm
index cd54112846..feaed4b561 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -288,6 +288,22 @@ (define-public package-2\n  'package)\n"
                        `(define-public package-1 'package))
     (call-with-input-file temp-file get-string-all)))
 
+(test-equal "find-expression"
+  (list `((filename . ,temp-file) (line . 0) (column . 0))
+        `((filename . ,temp-file) (line . 5) (column . 0))
+        #f)
+  (begin
+    (call-with-output-file temp-file
+      (lambda (port)
+        (display "(define-public package-1\n  'foo)\n\n" port)
+        (display "(define foo 'bar)\n\n" port)
+        (display "(define-public package-2\n  'baz)\n" port)))
+    (map (lambda (expr)
+           (find-expression temp-file expr identity))
+         (list `(define-public package 'foo)
+               `(define-public package-1 'bar)
+               `(define-public package-2 'baz)))))
+
 (test-equal "string-distance"
   '(0 1 1 5 5)
   (list
-- 
2.41.0





Information forwarded to guix@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, rekado@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.

Message received at 68935 <at> debbugs.gnu.org:


Received: (at 68935) by debbugs.gnu.org; 9 Feb 2024 19:26:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 09 14:26:47 2024
Received: from localhost ([127.0.0.1]:60232 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rYWWM-0001Zl-Pt
	for submit <at> debbugs.gnu.org; Fri, 09 Feb 2024 14:26:47 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:51759
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1rYWWH-0001YI-Fs
 for 68935 <at> debbugs.gnu.org; Fri, 09 Feb 2024 14:26:44 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1707506773;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=bo58dJWIAT1XdgL+H8EMd72drBrY1EfYAOnRR/lhCuU=;
 b=pinwblhG0M0VHFJFL2PWPK88ZiZ8pxd5FE+SNgQUHj8L5WuIcQ4/isv57x11bCVAYZxK1s
 cGWJ66MoOIuSwDQQxhuJoIURoDeAmxKLSqCZOtGCWIATGY6MGBeIrhQJDUsROfSoMAjbQS
 dc3r0SmQ5fWhm16yYEefP2lpNZIZAz59XdL+JVN+vMMMInhZWAsFwKo66rHym6/eSwmPY/
 FmebuPiTNtomIdshVnnalvzGuIlBfsIiOk0q76ZRyHXS1XZj5EmOt6sjhHNKffFpdq+cYx
 916fTy3412vpgLoEBQapzm7N4U/zwj+64Odk4doHftK5dx/lvyhSak8/U3mTUA==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 1eb830c3
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Fri, 9 Feb 2024 19:26:13 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 68935 <at> debbugs.gnu.org
Subject: [PATCH v2 3/6] utils: Add insert-expression procedure.
Date: Fri,  9 Feb 2024 20:25:15 +0100
Message-ID: <69ff85b93e8a7f9095412429c213a2e10e9b0e6d.1707505804.git.herman@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <3c0da641938e96a9f0c491abb74b30c75634df9a.1707505804.git.herman@HIDDEN>
References: <3c0da641938e96a9f0c491abb74b30c75634df9a.1707505804.git.herman@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Christopher Baines <guix@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 3.5 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * guix/utils.scm (define-module): Use (guix read-print) and
 export (insert-expression). (insert-expression): Add procedure. *
 tests/utils.scm ("insert-expression"): Add test. Change-Id:
 I971a43a78aa6ecaaef33c1a7a0db4b287eb85036
 --- guix/utils.scm | 11 +++++++++++ tests/utils.scm | 14 ++++++++++++++ 2
 files changed, 25 insertions(+) 
 Content analysis details:   (3.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
 [81.205.150.117 listed in zen.spamhaus.org]
 0.0 TVD_RCVD_IP            Message was received from an IP address
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 68935
Cc: ludo@HIDDEN, Herman Rimm <herman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * guix/utils.scm (define-module): Use (guix read-print) and
    export (insert-expression). (insert-expression): Add procedure. * tests/utils.scm
    ("insert-expression"): Add test. Change-Id: I971a43a78aa6ecaaef33c1a7a0db4b287eb85036
    --- guix/utils.scm | 11 +++++++++++ tests/utils.scm | 14 ++++++++++++++ 2
    files changed, 25 insertions(+) 
 
 Content analysis details:   (2.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                             [81.205.150.117 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* guix/utils.scm (define-module): Use (guix read-print) and export
(insert-expression).
(insert-expression): Add procedure.
* tests/utils.scm ("insert-expression"): Add test.

Change-Id: I971a43a78aa6ecaaef33c1a7a0db4b287eb85036
---
 guix/utils.scm  | 11 +++++++++++
 tests/utils.scm | 14 ++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/guix/utils.scm b/guix/utils.scm
index e4e9d922e7..8f0bc2399e 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@HIDDEN>
 ;;; Copyright © 2023 Zheng Junjie <873216071@HIDDEN>
 ;;; Copyright © 2023 Foundation Devices, Inc. <hello@HIDDEN>
+;;; Copyright © 2024 Herman Rimm <herman@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,6 +39,7 @@
 
 (define-module (guix utils)
   #:use-module (guix config)
+  #:use-module (guix read-print)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
@@ -145,6 +147,7 @@ (define-module (guix utils)
             go-to-location
             edit-expression
             delete-expression
+            insert-expression
 
             filtered-port
             decompressed-port
@@ -502,6 +505,14 @@ (define (delete-expression source-properties)
   "Delete the expression specified by SOURCE-PROPERTIES."
   (edit-expression source-properties (const "") #:include-trailing-newline? #t))
 
+(define (insert-expression source-properties expr)
+  "Insert EXPR before the top-level expression specified by
+SOURCE-PROPERTIES."
+  (let* ((expr (object->string* expr 0))
+         (insert (lambda (str)
+                   (string-append expr "\n\n" str))))
+    (edit-expression source-properties insert)))
+
 
 ;;;
 ;;; Keyword arguments.
diff --git a/tests/utils.scm b/tests/utils.scm
index 5664165c85..cd54112846 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@HIDDEN>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@HIDDEN>
 ;;; Copyright © 2023 Foundation Devices, Inc. <hello@HIDDEN>
+;;; Copyright © 2024 Herman Rimm <herman@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -274,6 +275,19 @@ (define (test-compression/decompression method run?)
                      string-reverse)
     (call-with-input-file temp-file get-string-all)))
 
+(test-equal "insert-expression"
+  "(define-public package-1\n  'package)\n
+(define-public package-2\n  'package)\n"
+  (begin
+    (call-with-output-file temp-file
+      (lambda (port)
+        (display "(define-public package-2\n  'package)\n" port)))
+    (insert-expression `((filename . ,temp-file)
+                         (line     . 0)
+                         (column   . 0))
+                       `(define-public package-1 'package))
+    (call-with-input-file temp-file get-string-all)))
+
 (test-equal "string-distance"
   '(0 1 1 5 5)
   (list
-- 
2.41.0





Information forwarded to guix@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, rekado@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.

Message received at 68935 <at> debbugs.gnu.org:


Received: (at 68935) by debbugs.gnu.org; 9 Feb 2024 19:26:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 09 14:26:44 2024
Received: from localhost ([127.0.0.1]:60226 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rYWWK-0001ZC-AD
	for submit <at> debbugs.gnu.org; Fri, 09 Feb 2024 14:26:44 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:51759
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1rYWWG-0001YI-1s
 for 68935 <at> debbugs.gnu.org; Fri, 09 Feb 2024 14:26:41 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1707506772;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=n7/eXQHPwdA8yU/5u6PHavnbXN5Xb8pyTdzEnAI/A3A=;
 b=e3WOTY9oROQwt+dFt/3ulU4IZwnYnKzOmLhn7TVkElzI7KHKDTiZXZQaECVHWH2clfxNF3
 fZQw1SyZxT/cQDOBPUft1u1PHNoZDLG23GyDOKcaQx6A6WrxGDJhYdAPSVAPSObdq3xORd
 iQ+Q8p5jwJhAFrjxABmtt5s7D69NR0CIvFcOctp/v+ofYYitoAF8bXZbFJ3kkyaR5slOsb
 jRggcyTRDXll7SVIm0I4yb1gkk0qlTJK8xI1zQodyKZ/mj2AB68mZt6y49L3QuQa92zcUm
 98A302YJi/ZEAxK/diOapRz0+/MAvPGLBBX2i01IZvCQjJaai/VW4MxqVTT3Zw==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id ca0198e2
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Fri, 9 Feb 2024 19:26:12 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 68935 <at> debbugs.gnu.org
Subject: [PATCH v2 2/6] import: Wrap package expressions with define-public.
Date: Fri,  9 Feb 2024 20:25:14 +0100
Message-ID: <037f2a3e463ed6ed6767356ec1c95a33cf08b658.1707505804.git.herman@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <3c0da641938e96a9f0c491abb74b30c75634df9a.1707505804.git.herman@HIDDEN>
References: <3c0da641938e96a9f0c491abb74b30c75634df9a.1707505804.git.herman@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Christopher Baines <guix@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 3.5 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * guix/scripts/import.scm (guix-import): Wrap package
 expressions.
 Change-Id: Ic4d986a4706a692b2fecd6fded8ac72ab6311687 ---
 guix/scripts/import.scm
 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 
 Content analysis details:   (3.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
 [81.205.150.117 listed in zen.spamhaus.org]
 0.0 TVD_RCVD_IP            Message was received from an IP address
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 68935
Cc: ludo@HIDDEN, Herman Rimm <herman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * guix/scripts/import.scm (guix-import): Wrap package expressions.
    Change-Id: Ic4d986a4706a692b2fecd6fded8ac72ab6311687 --- guix/scripts/import.scm
    | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 
 
 Content analysis details:   (2.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                             [81.205.150.117 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* guix/scripts/import.scm (guix-import): Wrap package expressions.

Change-Id: Ic4d986a4706a692b2fecd6fded8ac72ab6311687
---
 guix/scripts/import.scm | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm
index d2a1cee56e..77fcfe3990 100644
--- a/guix/scripts/import.scm
+++ b/guix/scripts/import.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@HIDDEN>
 ;;; Copyright © 2021 Xinglu Chen <public@HIDDEN>
 ;;; Copyright © 2022 Philip McGrath <philip@HIDDEN>
+;;; Copyright © 2024 Herman Rimm <herman@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,6 +24,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (guix scripts import)
+  #:use-module (guix import utils)
   #:use-module (guix ui)
   #:use-module (guix scripts)
   #:use-module (guix read-print)
@@ -89,12 +91,18 @@ (define-command (guix-import . args)
                          (pretty-print-with-comments (current-output-port) expr)))))
            (match (apply (resolve-importer importer) args)
              ((and expr (or ('package _ ...)
-                            ('let _ ...)
-                            ('define-public _ ...)))
+                            ('let _ ...)))
+              (print (package->definition expr)))
+             ((and expr ('define-public _ ...))
               (print expr))
              ((? list? expressions)
               (for-each (lambda (expr)
-                          (print expr)
+                          (match expr
+                            ((and expr (or ('package _ ...)
+                                           ('let _ ...)))
+                             (print (package->definition expr)))
+                            ((and expr ('define-public _ ...))
+                             (print expr)))
                           ;; Two newlines: one after the closing paren, and
                           ;; one to leave a blank line.
                           (newline) (newline))
-- 
2.41.0





Information forwarded to guix@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, rekado@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.

Message received at 68935 <at> debbugs.gnu.org:


Received: (at 68935) by debbugs.gnu.org; 9 Feb 2024 19:26:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 09 14:26:41 2024
Received: from localhost ([127.0.0.1]:60217 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rYWWG-0001Yk-O4
	for submit <at> debbugs.gnu.org; Fri, 09 Feb 2024 14:26:41 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:51759
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1rYWWF-0001YI-2P
 for 68935 <at> debbugs.gnu.org; Fri, 09 Feb 2024 14:26:39 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1707506772;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding;
 bh=+YRzR+vmH2DgPo4iAVuqWT0asuqrsZL/5RzjwEqjBiw=;
 b=hUOac+3z2arq5DPuI9HRVHKNZkejl8QVtAoAElIfkUaoV89N5cx7Yrb+BdF7TXWWrvDknu
 4DGkfncSW3/gQwdW/xZFLS7cWv+1t6FV/1kDceAT86piYY8i9TxV+pafw9jy3DFS8ps7NB
 xgy4HpFyVdA44FT4GsvCrR9xN5PHYA5R/5ixpwrsulPmxxq9CYH/INPMv3wcrgfC7iKvgP
 U8XYOK5CLRYVmqAf4muqzFkLdTiP5YHEhn4bZ4LAc2uPKiPcIyWrnHn3o9wAuDwpDEIy9X
 BV4uqGri7LT0t2FziKRcfOM53068LuRHW9Pi7GJgNBeKxJFirSsMcv9yu5CWOQ==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id ea4793cb
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Fri, 9 Feb 2024 19:26:12 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 68935 <at> debbugs.gnu.org
Subject: [PATCH v2 1/6] doc: Note SVN dependency of texlive importer.
Date: Fri,  9 Feb 2024 20:25:13 +0100
Message-ID: <3c0da641938e96a9f0c491abb74b30c75634df9a.1707505804.git.herman@HIDDEN>
X-Mailer: git-send-email 2.41.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 3.5 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * doc/guix.texi (Invoking guix import): Note dependency and
 remove duplicated words. Change-Id: I94320db8c8ab3569aa461876522d5560e37a19ea
 --- doc/guix.texi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
 Content analysis details:   (3.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
 [81.205.150.117 listed in zen.spamhaus.org]
 0.0 TVD_RCVD_IP            Message was received from an IP address
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 68935
Cc: ludo@HIDDEN, Herman Rimm <herman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * doc/guix.texi (Invoking guix import): Note dependency and
    remove duplicated words. Change-Id: I94320db8c8ab3569aa461876522d5560e37a19ea
    --- doc/guix.texi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
    
 
 Content analysis details:   (2.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                             [81.205.150.117 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* doc/guix.texi (Invoking guix import): Note dependency and remove
  duplicated words.

Change-Id: I94320db8c8ab3569aa461876522d5560e37a19ea
---
 doc/guix.texi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index b76df868f8..2908085c36 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -14334,7 +14334,7 @@ Invoking guix import
 
 Information is extracted from the @file{DESCRIPTION} file of the package.
 
-The command command below imports metadata for the Cairo R package:
+The command below imports metadata for the Cairo R package:
 
 @example
 guix import cran Cairo
@@ -14394,10 +14394,10 @@ Invoking guix import
 database, a plain text file that is included in the
 @code{texlive-scripts} package.  The source code is downloaded from
 possibly multiple locations in the SVN repository of the Tex Live
-project.
+project.  Note that therefore SVN must be installed and in @code{$PATH};
+run @code{guix install subversion} if needed.
 
-The command command below imports metadata for the @code{fontspec}
-TeX package:
+The command below imports metadata for the @code{fontspec} TeX package:
 
 @example
 guix import texlive fontspec

base-commit: 513755d64debb44096f21e323a5b89a7a597d2ca
-- 
2.41.0





Information forwarded to guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.

Message received at 68935 <at> debbugs.gnu.org:


Received: (at 68935) by debbugs.gnu.org; 7 Feb 2024 21:57:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 07 16:57:44 2024
Received: from localhost ([127.0.0.1]:58089 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rXpvL-0002vu-CY
	for submit <at> debbugs.gnu.org; Wed, 07 Feb 2024 16:57:44 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:58350)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1rXpvJ-0002ve-4d
 for 68935 <at> debbugs.gnu.org; Wed, 07 Feb 2024 16:57:42 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1rXpuw-0007jb-Oj; Wed, 07 Feb 2024 16:57:18 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=0rK3aN9asCsaUq+Cn675IoolNO2vaB0oi9Y081BVDho=; b=aB/W95QrJGDW2EzXGZkq
 uvtp+defpwKLpZXzOJMvcVSTuVr2BYP7JuSLMmn1vEqT+REnkFF7M9u0xwyFNhjWSE58Jt0B8X7+i
 j6PPkI/cLwuHxjY3u6y8Oc5qpkH7Qkth23nnhgRpBAuaQdXfaH9nspa9wCogr2eD/IILNRob0dpsL
 DVH2v1qzV+NJD7WDOpbIumAkJ9VKMNuWNAvVU/VnC16h4+OhWJ/ebma2U4JCxEPkUpvdVB2Z7HUks
 S9WxRmAqUqjpFftOxsGBkkcu14P3vqhxQx9VDdjsH3e9GiwXDGr/3jUgJKiyEWDBlqTo0lLx7GSHQ
 MtV5cXxQg9Zkxw==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Herman Rimm <herman@HIDDEN>
Subject: Re: [bug#68935] [PATCH 3/3] guix: import: Put packages into modules
 in alphabetical order.
In-Reply-To: <a380fd9adc163c8b425397163956672f5cda70c5.1707144191.git.herman@HIDDEN>
 (Herman Rimm's message of "Mon, 5 Feb 2024 16:07:14 +0100")
References: <cover.1707144190.git.herman@HIDDEN>
 <a380fd9adc163c8b425397163956672f5cda70c5.1707144191.git.herman@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Nonidi 19 =?utf-8?Q?Pluvi=C3=B4se?= an 232 de la
 =?utf-8?Q?R=C3=A9volution=2C?= jour de la Pulmonaire
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: Wed, 07 Feb 2024 22:57:12 +0100
Message-ID: <874jek3pl3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68935
Cc: Josselin Poiret <dev@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>,
 Tobias Geerinckx-Rice <me@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>,
 68935 <at> debbugs.gnu.org, Christopher Baines <guix@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Herman Rimm <herman@HIDDEN> skribis:

> * guix/scripts/import.scm (guix-import): Add 'put' option.
> (try-import): Add variable.
> * doc/guix.texi (Invoking guix import): Describe 'put' option.
>
> Change-Id: Ied4fc95899c31fb2523a01139780fc9744aa63cb

Nice!  This can certainly simplify people=E2=80=99s work!

>  @example
> -guix import @var{importer} @var{options}@dots{}
> +guix import @var{option} @var{importer} @var{options}@dots{}

Uh?  It looks weird at first.  :-)

For clarity, we should change it to something like:

  guix import [@var{global-options}@dots{}] @var{importer} @var{package} [@=
var{options}@dots{}]

=E2=80=A6 though I admit this doesn=E2=80=99t look great either.

> +@item --put=3D@var{file}
> +@itemx -p @var{file}
> +Insert the package definition(s) that the @var{importer} generated into =
the

How about calling it =E2=80=98--insert=E2=80=99?  It seems more natural.

> +(define (try-import importer args finish)

Please add a docstring for top-level procedures like this one:

  https://guix.gnu.org/manual/devel/en/html_node/Formatting-Code.html

> +  (if (member importer importers)
> +        (match (apply (resolve-importer importer) args)

Indentation of the second line is off.

> +          ((and expr ('package _ ...))
> +           (finish (package->definition expr)))
> +          ((and expr (or ('let _ ...)
> +                         ('define-public _ ...)))
> +           (finish expr))

Again (let =E2=80=A6) should be treated like (package =E2=80=A6).

> +          ((? list? expressions)
> +           (for-each (lambda (expr)
> +               (match expr
> +                      ((and expr ('package _ ...))
> +                       (finish (package->definition expr)))
> +                      ((and expr (or ('let _ ...)
> +                                     ('define-public _ ...)))
> +                       (finish expr))))

Likewise.  Also indentation of =E2=80=98match=E2=80=99 and that of the subs=
equent
clauses is off.

> -    ((or ("-h") ("--help"))
> +    ((or ("-h" _ ...) ("--help" _ ...))
>       (leave-on-EPIPE (show-help))
>       (exit 0))
> -    ((or ("-V") ("--version"))
> +    ((or ("-V" _ ...) ("--version" _ ...))
>       (show-version-and-exit "guix import"))

This change seems to be unrelated, right?

> +    ((or ("-p" module importer args ...)
> +         ("--put" module importer args ...))
> +     (let ((put (lambda (expr)
> +                  (let ((line
> +                    (call-with-input-file module
> +                      (lambda (port)
> +                        (do ((se (read-syntax port)
> +                                 (read-syntax port)))
> +                          ((match (syntax->datum se)
> +                             (('define-public symbol _ ...)
> +                              (string> (symbol->string symbol)
> +                                       (symbol->string (cadr expr))))
> +                             ((? eof-object?) #t)
> +                             (_ #f))
> +                           (if (eof-object? se)
> +                             #f
> +                             (car (string-split
> +                                    (object->string*
> +                                      (syntax->datum se) 0)
> +                                    #\newline)))))))))
> +                    (if line
> +                        (substitute* module
> +                          (((string-append "\\" line))
> +                           (string-append
> +                             (object->string* expr 0)
> +                             "\n\n" line)))
> +                        (let ((port (open-file module "a")))
> +                          (pretty-print-with-comments port expr)
> +                          (newline port)
> +                          (close-port port)))))))

This whole thing should be in a separate procedure, probably in (guix
utils), close to =E2=80=98edit-expression=E2=80=99, and we could call it
=E2=80=98insert-expression=E2=80=99 and it would take the location where th=
e caller
wants to insert an expression.

Then, separately, we need a procedure to determine that location based
on the alphabetical order to top-level =E2=80=98define-public=E2=80=99 occu=
rrences.

Does that make sense?  We should try and add tests for these in
=E2=80=98tests/utils.scm=E2=80=99.

Also please check out the coding style regarding use of =E2=80=98car=E2=80=
=99 etc.:

  https://guix.gnu.org/manual/devel/en/html_node/Data-Types-and-Pattern-Mat=
ching.html

Could you send an updated series?

Please let us know if anything=E2=80=99s unclear or if you need guidance.

Thank you!

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.

Message received at 68935 <at> debbugs.gnu.org:


Received: (at 68935) by debbugs.gnu.org; 7 Feb 2024 21:39:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 07 16:39:22 2024
Received: from localhost ([127.0.0.1]:58070 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rXpdZ-0002Pm-Ng
	for submit <at> debbugs.gnu.org; Wed, 07 Feb 2024 16:39:21 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:52290)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1rXpdX-0002PY-G4
 for 68935 <at> debbugs.gnu.org; Wed, 07 Feb 2024 16:39:20 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1rXpdC-0004iZ-CK; Wed, 07 Feb 2024 16:38:58 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=WyZ/Kq6A1fKx2JLduXZU0yT6kcC4gdaaGrNpmItNkt0=; b=a+97lPfu8FRgywkV2kq1
 w2hPzlbnVjXZc12f5+lvE9DnhR/ZxmdckrCjTj+qTFmZsd/UbcJ38xvafztnarBvzI0zOGDcBHWow
 V6lQCj3gBRCl7kCprWxX6R0NlC6PPFzkXrFy1j0AxOuOGx8zKodtqwAC7Uxavr5UxLZdt0ERfpr3N
 mTqgrpcO92vaGXBBqfPrfS2g1rG3N1geg5Lwk0Lw4bVfRcsAsMRGlZQ16vuxaAWSseutM3FGqTG4K
 ywtLyTFU9y5cJSrIBsriaJIfLVpEXxCGZdMc9ilw7yMt/fHzoVYZXPdFbRh0cR4jXi7EQ4Sdaq7sH
 +2aDXsPLPonmig==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Herman Rimm <herman@HIDDEN>
Subject: Re: [bug#68935] [PATCH 2/3] guix: import: Wrap package expressions
 with define-public.
In-Reply-To: <f51c93b2814ed5f1124d05a0769d81a236cf0883.1707144191.git.herman@HIDDEN>
 (Herman Rimm's message of "Mon, 5 Feb 2024 16:07:13 +0100")
References: <cover.1707144190.git.herman@HIDDEN>
 <f51c93b2814ed5f1124d05a0769d81a236cf0883.1707144191.git.herman@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Nonidi 19 =?utf-8?Q?Pluvi=C3=B4se?= an 232 de la
 =?utf-8?Q?R=C3=A9volution=2C?= jour de la Pulmonaire
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: Wed, 07 Feb 2024 22:38:52 +0100
Message-ID: <87bk8s3qfn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68935
Cc: Josselin Poiret <dev@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>,
 Tobias Geerinckx-Rice <me@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>,
 68935 <at> debbugs.gnu.org, Christopher Baines <guix@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Herman Rimm <herman@HIDDEN> skribis:

> * guix/scripts/import.scm (guix-import): Wrap package expressions.
>
> Change-Id: Ic4d986a4706a692b2fecd6fded8ac72ab6311687

Probably a good idea!

>             (match (apply (resolve-importer importer) args)
> -             ((and expr (or ('package _ ...)
> -                            ('let _ ...)
> +             ((and expr ('package _ ...))
> +              (print (package->definition expr)))
> +             ((and expr (or ('let _ ...)
>                              ('define-public _ ...)))
>                (print expr))

The (let =E2=80=A6) case should be treated like the (package =E2=80=A6) cas=
e.  It
corresponds to things like:

  (let ((commit "abcde"))
    (package
      =E2=80=A6))

> +                  (match expr
> +                         ((and expr ('package _ ...))
> +                          (print (package->definition expr)))
> +                         ((and expr (or ('let _ ...)
> +                                        ('define-public _ ...)))
> +                          (print expr)))

Same here.

Also, please indent =E2=80=98match=E2=80=99 the same way as elsewhere in th=
e code:

  (match lst
    ((x y z)
     =E2=80=A6))

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.

Message received at 68935 <at> debbugs.gnu.org:


Received: (at 68935) by debbugs.gnu.org; 7 Feb 2024 21:34:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 07 16:34:31 2024
Received: from localhost ([127.0.0.1]:58061 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rXpYs-0002Ik-MU
	for submit <at> debbugs.gnu.org; Wed, 07 Feb 2024 16:34:30 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:56690)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1rXpYr-0002IY-1E
 for 68935 <at> debbugs.gnu.org; Wed, 07 Feb 2024 16:34:29 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1rXpYT-0003ye-Ju; Wed, 07 Feb 2024 16:34:06 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=tDskGhrJ1Y7Jdp/3nEXj+Z1AKnwTcUoyimmG+jOC6BY=; b=OkZ6lxctdgv/vuWc6UFc
 UXHpYAfLXlGcAAIQTV7kfE2zYIiebfTmTvM/zZJV6zx7l9QmmJOM7rgpZqwzIcFB6P4pav9bbErof
 2vYxb9RtItWGig9lNkF1f5tB8SiBkKHSwUQ7yxU/BdCiN8POeBzSZKYtC6LMPRyxVtXDlZ459ogrY
 dvpWcUKOms2GkijHblypVQ31RZpHv/M7AxW0dPfz2izJtFfpAhQrd/vAiIUCPwbJHR07fd5PaNzty
 EfR5FDL5JkHyav1iBQeCCo6LHuk5B7UmXw8mZ3Yx5BGsFN000k1oodIrsfs4sRulIVhp59cnnXf7Q
 XzdquNIwDe4veQ==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Herman Rimm <herman@HIDDEN>
Subject: Re: [bug#68935] [PATCH 1/3] svn-fetch: Require svn-command argument.
In-Reply-To: <3a3748ee3fd345ff26bd63979bf8cee2c32d87ab.1707144191.git.herman@HIDDEN>
 (Herman Rimm's message of "Mon, 5 Feb 2024 16:07:12 +0100")
References: <cover.1707144190.git.herman@HIDDEN>
 <3a3748ee3fd345ff26bd63979bf8cee2c32d87ab.1707144191.git.herman@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Nonidi 19 =?utf-8?Q?Pluvi=C3=B4se?= an 232 de la
 =?utf-8?Q?R=C3=A9volution=2C?= jour de la Pulmonaire
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: Wed, 07 Feb 2024 22:34:01 +0100
Message-ID: <87fry43qnq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68935
Cc: Josselin Poiret <dev@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>,
 Tobias Geerinckx-Rice <me@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>,
 68935 <at> debbugs.gnu.org, Christopher Baines <guix@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi Herman,

Herman Rimm <herman@HIDDEN> skribis:

> * guix/build/svn.scm (svn-fetch): Require svn-command argument.
> * guix/svn-download.scm: Pass svn-command to each (svn-fetch).
>
> Change-Id: Ibc7d3a79e45374588f71ca4d4ac2685c60ff3c00

Usually we write all the entities (procedures, variables, etc.)
modified in the commit log to help review.

> -(define* (svn-fetch url revision directory
> -                    #:key (svn-command "svn")
> -                    (recursive? #t)
> +(define* (svn-fetch url revision directory svn-command
> +                    #:key (recursive? #t)
>                      (user-name #f)
>                      (password #f))

What=E2=80=99s the rationale for this change?

It=E2=80=99s a relatively common pattern in Guix build-side code to assume =
that
commands can be found in $PATH while still providing a way to specify
the command=E2=80=99s absolute file name.

>  (define* (download-svn-to-store store ref
>                                  #:optional (name (basename (svn-referenc=
e-url ref)))
> -                                #:key (log (current-error-port)))
> +                                #:key (log (current-error-port))
> +                                (svn (subversion-package)))
>    "Download from REF, a <svn-reference> object to STORE.  Write progress
>  reports to LOG."
>    (call-with-temporary-directory
>     (lambda (temp)
>       (let ((result
>              (parameterize ((current-output-port log))
> -              (build:svn-fetch (svn-reference-url ref)
> +              (with-imported-modules
> +                  (source-module-closure '((guix build svn)
> +                                           (guix build utils)))
> +                #~(begin
> +                    (use-modules (guix build svn)
> +                                 (guix build utils))
> +                    (svn-fetch (svn-reference-url ref)
>                                 (svn-reference-revision ref)
>                                 (string-append temp "/svn")
> +                               #+(file-append svn "/bin/svn")
>                                 #:user-name (svn-reference-user-name ref)
> -                               #:password (svn-reference-password ref)))=
))
> +                               #:password (svn-reference-password ref)))=
))))
>         (and result
>              (add-to-store store name #t "sha256"
>                            (string-append temp "/svn")))))))

This doesn=E2=80=99t have the desired effect: =E2=80=98download-svn-to-stor=
e=E2=80=99 will now
always return a gexp instead of returning either #f or a store file
name.

This procedure and =E2=80=98download-multi-svn-to-store=E2=80=99 (used by t=
he texlive
importer) really expect =E2=80=9Csvn=E2=80=9D to be in $PATH.  It cannot re=
ally be
avoided AFAICS.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.

Message received at 68935 <at> debbugs.gnu.org:


Received: (at 68935) by debbugs.gnu.org; 5 Feb 2024 15:08:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 05 10:08:19 2024
Received: from localhost ([127.0.0.1]:52047 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rX0a3-0004pI-2C
	for submit <at> debbugs.gnu.org; Mon, 05 Feb 2024 10:08:19 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:43109
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1rX0Zy-0004od-Pp
 for 68935 <at> debbugs.gnu.org; Mon, 05 Feb 2024 10:08:15 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1707145677;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=D3zUN2GJzMX0yBFtuIidLr6HXh+Sv2QSl0hP9C5ux0Y=;
 b=rEwOJijsGDNxnmmbtCVFpW5O/dlHWSxKPwZmKdHfZ6dtAjEOzpbZAGRssejpTyHU+TjTze
 aZhFYZSblZXPKI6rhDEF3ulsafqJrmJwXawTM//9jjn3lnAuUjKctq5aEHeHAb0+fv/0XL
 HvMWDK0juD2koiEZ0HihA1GTdku89kpJovsiDyxy6YrWrhJix8GUV8zPuXDubfiHcD3wRk
 qiJgHLwM/D+zj9Ypq+mF5qARr2L7vG6iEjs0ZnjcbjMnNefdRuGrdloeh5GTU3fXsroISt
 kps5BQfQdPRq8nUu6it5HxNcQOhx2IHUxZFT8k+ZYVcRIYD3zGhybJufVNxfZQ==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 91e67915
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Mon, 5 Feb 2024 15:07:57 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 68935 <at> debbugs.gnu.org
Subject: [PATCH 3/3] guix: import: Put packages into modules in alphabetical
 order.
Date: Mon,  5 Feb 2024 16:07:14 +0100
Message-ID: <a380fd9adc163c8b425397163956672f5cda70c5.1707144191.git.herman@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <cover.1707144190.git.herman@HIDDEN>
References: <cover.1707144190.git.herman@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Christopher Baines <guix@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 3.5 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  * guix/scripts/import.scm (guix-import): Add 'put' option.
 (try-import): Add variable. * doc/guix.texi (Invoking guix import): Describe
 'put' option. Change-Id: Ied4fc95899c31fb2523a01139780fc9744aa63cb ---
 doc/guix.texi
 | 14 +++++- guix/scripts/import.scm | 100 +++++++++++++++++++++++++++ 2 files
 changed, 81 insertions(+), 33 deletion [...] 
 Content analysis details:   (3.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
 [81.205.150.117 listed in zen.spamhaus.org]
 0.0 TVD_RCVD_IP            Message was received from an IP address
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 68935
Cc: Herman Rimm <herman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * guix/scripts/import.scm (guix-import): Add 'put' option.
    (try-import): Add variable. * doc/guix.texi (Invoking guix import): Describe
    'put' option. Change-Id: Ied4fc95899c31fb2523a01139780fc9744aa63cb --- doc/guix.texi
    | 14 +++++- guix/scripts/import.scm | 100 +++++++++++++++++++++++++++ 2 files
    changed, 81 insertions(+), 33 deletion [...] 
 
 Content analysis details:   (2.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                             [81.205.150.117 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* guix/scripts/import.scm (guix-import): Add 'put' option.
(try-import): Add variable.
* doc/guix.texi (Invoking guix import): Describe 'put' option.

Change-Id: Ied4fc95899c31fb2523a01139780fc9744aa63cb
---
 doc/guix.texi           |  14 +++++-
 guix/scripts/import.scm | 100 +++++++++++++++++++++++++++-------------
 2 files changed, 81 insertions(+), 33 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index b76df868f8..5ab4c0d2a8 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -124,6 +124,7 @@
 Copyright @copyright{} 2023 Saku Laesvuori@*
 Copyright @copyright{} 2023 Graham James Addis@*
 Copyright @copyright{} 2023 Tomas Volf@*
+Copyright @copyright{} 2024 Herman Rimm@*
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -14178,12 +14179,21 @@ Invoking guix import
 The general syntax is:
 
 @example
-guix import @var{importer} @var{options}@dots{}
+guix import @var{option} @var{importer} @var{options}@dots{}
 @end example
 
 @var{importer} specifies the source from which to import package
 metadata, and @var{options} specifies a package identifier and other
-options specific to @var{importer}.
+options specific to @var{importer}. @command{guix import} itself has the
+following options:
+
+@table @code
+@item --put=@var{file}
+@itemx -p @var{file}
+Insert the package definition(s) that the @var{importer} generated into the
+specified @var{file}, either in alphabetical order among existing package
+definitions, or at the end of the file otherwise.
+@end table
 
 Some of the importers rely on the ability to run the @command{gpgv} command.
 For these, GnuPG must be installed and in @code{$PATH}; run @code{guix install
diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm
index 80b1bec7fc..0d83483c4e 100644
--- a/guix/scripts/import.scm
+++ b/guix/scripts/import.scm
@@ -24,6 +24,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (guix scripts import)
+  #:use-module (guix build utils)
   #:use-module (guix import utils)
   #:use-module (guix ui)
   #:use-module (guix scripts)
@@ -67,10 +68,37 @@ (define (show-help)
   (display (G_ "
   -h, --help             display this help and exit"))
   (display (G_ "
+  -p, --put              put the import in a package module"))
+  (display (G_ "
   -V, --version          display version information and exit"))
   (newline)
   (show-bug-report-information))
 
+(define (try-import importer args finish)
+  (if (member importer importers)
+        (match (apply (resolve-importer importer) args)
+          ((and expr ('package _ ...))
+           (finish (package->definition expr)))
+          ((and expr (or ('let _ ...)
+                         ('define-public _ ...)))
+           (finish expr))
+          ((? list? expressions)
+           (for-each (lambda (expr)
+               (match expr
+                      ((and expr ('package _ ...))
+                       (finish (package->definition expr)))
+                      ((and expr (or ('let _ ...)
+                                     ('define-public _ ...)))
+                       (finish expr))))
+             expressions))
+          (x
+           (leave (G_ "'~a' import failed~%") importer)))
+      (let ((hint (string-closest importer importers #:threshold 3)))
+        (report-error (G_ "~a: invalid importer~%") importer)
+        (when hint
+          (display-hint (G_ "Did you mean @code{~a}?~%") hint))
+        (exit 1))))
+
 (define-command (guix-import . args)
   (category packaging)
   (synopsis "import a package definition from an external repository")
@@ -79,38 +107,48 @@ (define-command (guix-import . args)
     (()
      (format (current-error-port)
              (G_ "guix import: missing importer name~%")))
-    ((or ("-h") ("--help"))
+    ((or ("-h" _ ...) ("--help" _ ...))
      (leave-on-EPIPE (show-help))
      (exit 0))
-    ((or ("-V") ("--version"))
+    ((or ("-V" _ ...) ("--version" _ ...))
      (show-version-and-exit "guix import"))
+    ((or ("-p" module importer args ...)
+         ("--put" module importer args ...))
+     (let ((put (lambda (expr)
+                  (let ((line
+                    (call-with-input-file module
+                      (lambda (port)
+                        (do ((se (read-syntax port)
+                                 (read-syntax port)))
+                          ((match (syntax->datum se)
+                             (('define-public symbol _ ...)
+                              (string> (symbol->string symbol)
+                                       (symbol->string (cadr expr))))
+                             ((? eof-object?) #t)
+                             (_ #f))
+                           (if (eof-object? se)
+                             #f
+                             (car (string-split
+                                    (object->string*
+                                      (syntax->datum se) 0)
+                                    #\newline)))))))))
+                    (if line
+                        (substitute* module
+                          (((string-append "\\" line))
+                           (string-append
+                             (object->string* expr 0)
+                             "\n\n" line)))
+                        (let ((port (open-file module "a")))
+                          (pretty-print-with-comments port expr)
+                          (newline port)
+                          (close-port port)))))))
+       (try-import importer args put)))
     ((importer args ...)
-     (if (member importer importers)
-         (let ((print (lambda (expr)
-                        (leave-on-EPIPE
-                         (pretty-print-with-comments (current-output-port) expr)))))
-           (match (apply (resolve-importer importer) args)
-             ((and expr ('package _ ...))
-              (print (package->definition expr)))
-             ((and expr (or ('let _ ...)
-                            ('define-public _ ...)))
-              (print expr))
-             ((? list? expressions)
-              (for-each (lambda (expr)
-                  (match expr
-                         ((and expr ('package _ ...))
-                          (print (package->definition expr)))
-                         ((and expr (or ('let _ ...)
-                                        ('define-public _ ...)))
-                          (print expr)))
-                  ;; Two newlines: one after the closing paren, and
-                  ;; one to leave a blank line.
-                  (newline) (newline))
-                expressions))
-             (x
-              (leave (G_ "'~a' import failed~%") importer))))
-         (let ((hint (string-closest importer importers #:threshold 3)))
-           (report-error (G_ "~a: invalid importer~%") importer)
-           (when hint
-             (display-hint (G_ "Did you mean @code{~a}?~%") hint))
-           (exit 1))))))
+     (let ((print (lambda (expr)
+                    (leave-on-EPIPE
+                      (pretty-print-with-comments
+                        (current-output-port) expr)
+                      ;; Two newlines: one after the closing paren,
+                      ;; and one to leave a blank line.
+                      (newline) (newline)))))
+       (try-import importer args print)))))
-- 
2.41.0





Information forwarded to guix@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, rekado@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.

Message received at 68935 <at> debbugs.gnu.org:


Received: (at 68935) by debbugs.gnu.org; 5 Feb 2024 15:08:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 05 10:08:19 2024
Received: from localhost ([127.0.0.1]:52045 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rX0a2-0004pA-Ix
	for submit <at> debbugs.gnu.org; Mon, 05 Feb 2024 10:08:18 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:43641
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1rX0Zy-0004oD-Pq
 for 68935 <at> debbugs.gnu.org; Mon, 05 Feb 2024 10:08:15 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1707145673;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=/IPLwMx8HZP07Kwigd95/LUuPce0HMolgFR6mKhVN7w=;
 b=rc+HqMYWe8lBXNtF0yrXHkxg887bK7WbSmujKr0jJTcLjoVwO9uRbXtjnXbmXJHlKBxhHT
 u6TqqjF3TSOWFVe9mifTHkzWCJ/KdB75/mXOa8IVd4mljebt6HTBBnJHxfMFwDXwHU0voP
 xnM0qEWNM34h2Ee8TYrPETqcshhLyom7PQA2KegqEngTP5EAcxkB9QTouW4RYWueHLtJo1
 8U9UnZnTg2HpYGji3F1QFUybGadRdc0v7daN0Ed5HhRVamfPAXvlTdj3JRpiPak62zX3NT
 Tu+O0laXcnwjvTfqFLw7JcsFkfeMoxShzuEWT22zINuODvbStCC069otTdDu0A==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 38f6fb90
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Mon, 5 Feb 2024 15:07:53 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 68935 <at> debbugs.gnu.org
Subject: [PATCH 2/3] guix: import: Wrap package expressions with define-public.
Date: Mon,  5 Feb 2024 16:07:13 +0100
Message-ID: <f51c93b2814ed5f1124d05a0769d81a236cf0883.1707144191.git.herman@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <cover.1707144190.git.herman@HIDDEN>
References: <cover.1707144190.git.herman@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Christopher Baines <guix@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 3.5 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * guix/scripts/import.scm (guix-import): Wrap package
 expressions.
 Change-Id: Ic4d986a4706a692b2fecd6fded8ac72ab6311687 ---
 guix/scripts/import.scm
 | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-)
 Content analysis details:   (3.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
 [81.205.150.117 listed in zen.spamhaus.org]
 0.0 TVD_RCVD_IP            Message was received from an IP address
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 68935
Cc: Herman Rimm <herman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * guix/scripts/import.scm (guix-import): Wrap package expressions.
    Change-Id: Ic4d986a4706a692b2fecd6fded8ac72ab6311687 --- guix/scripts/import.scm
    | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-)
    
 
 Content analysis details:   (2.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                             [81.205.150.117 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* guix/scripts/import.scm (guix-import): Wrap package expressions.

Change-Id: Ic4d986a4706a692b2fecd6fded8ac72ab6311687
---
 guix/scripts/import.scm | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm
index d2a1cee56e..80b1bec7fc 100644
--- a/guix/scripts/import.scm
+++ b/guix/scripts/import.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@HIDDEN>
 ;;; Copyright © 2021 Xinglu Chen <public@HIDDEN>
 ;;; Copyright © 2022 Philip McGrath <philip@HIDDEN>
+;;; Copyright © 2024 Herman Rimm <herman@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,6 +24,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (guix scripts import)
+  #:use-module (guix import utils)
   #:use-module (guix ui)
   #:use-module (guix scripts)
   #:use-module (guix read-print)
@@ -88,17 +90,23 @@ (define-command (guix-import . args)
                         (leave-on-EPIPE
                          (pretty-print-with-comments (current-output-port) expr)))))
            (match (apply (resolve-importer importer) args)
-             ((and expr (or ('package _ ...)
-                            ('let _ ...)
+             ((and expr ('package _ ...))
+              (print (package->definition expr)))
+             ((and expr (or ('let _ ...)
                             ('define-public _ ...)))
               (print expr))
              ((? list? expressions)
               (for-each (lambda (expr)
-                          (print expr)
-                          ;; Two newlines: one after the closing paren, and
-                          ;; one to leave a blank line.
-                          (newline) (newline))
-                        expressions))
+                  (match expr
+                         ((and expr ('package _ ...))
+                          (print (package->definition expr)))
+                         ((and expr (or ('let _ ...)
+                                        ('define-public _ ...)))
+                          (print expr)))
+                  ;; Two newlines: one after the closing paren, and
+                  ;; one to leave a blank line.
+                  (newline) (newline))
+                expressions))
              (x
               (leave (G_ "'~a' import failed~%") importer))))
          (let ((hint (string-closest importer importers #:threshold 3)))
-- 
2.41.0





Information forwarded to guix@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, rekado@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.

Message received at 68935 <at> debbugs.gnu.org:


Received: (at 68935) by debbugs.gnu.org; 5 Feb 2024 15:08:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 05 10:08:16 2024
Received: from localhost ([127.0.0.1]:52043 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rX0Zz-0004oq-Hz
	for submit <at> debbugs.gnu.org; Mon, 05 Feb 2024 10:08:16 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:43641
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1rX0Zt-0004oD-3U
 for 68935 <at> debbugs.gnu.org; Mon, 05 Feb 2024 10:08:14 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1707145666;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=hoIJdq+TfLtIjUjAHKlPhVdCPKO5fep6YvHnsrA2ZBM=;
 b=FVVMG6EK3aKTUrvC5U9tb1qQxjJsDe/k0TezZVHi+9ap103j3xO80/eAZYdbDFPbuivst1
 9vIM3+EGjHbYN+/8ziBldU01SN8pbgyRanpvjU7l4sZkr1q1BykL9Q4o2RnxwWtQ5l8JCV
 dFuHDT+CY0MM1sYq0LWSY/oQi2E4oE4CWew7Q/barR8Kzhh3WZjygj7Fs9itp8BnnChbXY
 lHj2nThcubK8vwKs5aqKLiySP48Jt8zIKTurZGaVwT3l2fYYBkZLLUfTpwX1WVqxrvKKT6
 tLDQtR8rDxoHrzr6thNgl+jt8bGxFGV4emXStQ1ImtVIpFmaEhjOybhJXOg5vw==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 361dc3bd
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Mon, 5 Feb 2024 15:07:46 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 68935 <at> debbugs.gnu.org
Subject: [PATCH 1/3] svn-fetch: Require svn-command argument.
Date: Mon,  5 Feb 2024 16:07:12 +0100
Message-ID: <3a3748ee3fd345ff26bd63979bf8cee2c32d87ab.1707144191.git.herman@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <cover.1707144190.git.herman@HIDDEN>
References: <cover.1707144190.git.herman@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Christopher Baines <guix@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 3.6 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * guix/build/svn.scm (svn-fetch): Require svn-command
 argument.
 * guix/svn-download.scm: Pass svn-command to each (svn-fetch). Change-Id:
 Ibc7d3a79e45374588f71ca4d4ac2685c60ff3c00 --- guix/build/svn.scm | 5 ++---
 guix/svn-download.scm | 35 ++++++++++++++++++++++++++--------- 2 files changed,
 28 insertions(+), 12 deletions(-) 
 Content analysis details:   (3.6 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 TVD_RCVD_IP            Message was received from an IP address
 3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
 [81.205.150.117 listed in zen.spamhaus.org]
 0.0 T_SPF_TEMPERROR        SPF: test of record failed (temperror)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 0.0 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS
X-Debbugs-Envelope-To: 68935
Cc: Herman Rimm <herman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * guix/build/svn.scm (svn-fetch): Require svn-command argument.
    * guix/svn-download.scm: Pass svn-command to each (svn-fetch). Change-Id:
    Ibc7d3a79e45374588f71ca4d4ac2685c60ff3c00 --- guix/build/svn.scm | 5 ++---
    guix/svn-download.scm | 35 ++++++++++++++++++++++++++--------- 2 files changed,
    28 insertions(+), 12 deletions(-) 
 
 Content analysis details:   (2.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                             [81.205.150.117 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* guix/build/svn.scm (svn-fetch): Require svn-command argument.
* guix/svn-download.scm: Pass svn-command to each (svn-fetch).

Change-Id: Ibc7d3a79e45374588f71ca4d4ac2685c60ff3c00
---
 guix/build/svn.scm    |  5 ++---
 guix/svn-download.scm | 35 ++++++++++++++++++++++++++---------
 2 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/guix/build/svn.scm b/guix/build/svn.scm
index 875d3c50ca..e8f168abc6 100644
--- a/guix/build/svn.scm
+++ b/guix/build/svn.scm
@@ -31,9 +31,8 @@ (define-module (guix build svn)
 ;;;
 ;;; Code:
 
-(define* (svn-fetch url revision directory
-                    #:key (svn-command "svn")
-                    (recursive? #t)
+(define* (svn-fetch url revision directory svn-command
+                    #:key (recursive? #t)
                     (user-name #f)
                     (password #f))
   "Fetch REVISION from URL into DIRECTORY.  REVISION must be an integer, and a
diff --git a/guix/svn-download.scm b/guix/svn-download.scm
index c6688908de..c4eeed3563 100644
--- a/guix/svn-download.scm
+++ b/guix/svn-download.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2014-2016, 2019, 2021-2023 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@HIDDEN>
 ;;; Copyright © 2017, 2019, 2021 Ricardo Wurmus <rekado@HIDDEN>
+;;; Copyright © 2024 Herman Rimm <herman@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -105,7 +106,7 @@ (define* (svn-fetch ref hash-algo hash
             (or (svn-fetch (getenv "svn url")
                            (string->number (getenv "svn revision"))
                            #$output
-                           #:svn-command #+(file-append svn "/bin/svn")
+                           #+(file-append svn "/bin/svn")
                            #:recursive? (match (getenv "svn recursive?")
                                           ("yes" #t)
                                           (_ #f))
@@ -195,7 +196,7 @@ (define* (svn-multi-fetch ref hash-algo hash
                               (if (string-suffix? "/" location)
                                   (string-append #$output "/" location)
                                   (string-append #$output "/" (dirname location)))
-                              #:svn-command #+(file-append svn "/bin/svn")
+                              #+(file-append svn "/bin/svn")
                               #:recursive? (match (getenv "svn recursive?")
                                              ("yes" #t)
                                              (_ #f))
@@ -245,25 +246,34 @@ (define* (svn-multi-fetch ref hash-algo hash
 
 (define* (download-svn-to-store store ref
                                 #:optional (name (basename (svn-reference-url ref)))
-                                #:key (log (current-error-port)))
+                                #:key (log (current-error-port))
+                                (svn (subversion-package)))
   "Download from REF, a <svn-reference> object to STORE.  Write progress
 reports to LOG."
   (call-with-temporary-directory
    (lambda (temp)
      (let ((result
             (parameterize ((current-output-port log))
-              (build:svn-fetch (svn-reference-url ref)
+              (with-imported-modules
+                  (source-module-closure '((guix build svn)
+                                           (guix build utils)))
+                #~(begin
+                    (use-modules (guix build svn)
+                                 (guix build utils))
+                    (svn-fetch (svn-reference-url ref)
                                (svn-reference-revision ref)
                                (string-append temp "/svn")
+                               #+(file-append svn "/bin/svn")
                                #:user-name (svn-reference-user-name ref)
-                               #:password (svn-reference-password ref)))))
+                               #:password (svn-reference-password ref)))))))
        (and result
             (add-to-store store name #t "sha256"
                           (string-append temp "/svn")))))))
 
 (define* (download-multi-svn-to-store store ref
                                       #:optional (name (basename (svn-multi-reference-url ref)))
-                                      #:key (log (current-error-port)))
+                                      #:key (log (current-error-port))
+                                      (svn (subversion-package)))
   "Download from REF, a <svn-multi-reference> object to STORE.  Write progress
 reports to LOG."
   (call-with-temporary-directory
@@ -272,16 +282,23 @@ (define* (download-multi-svn-to-store store ref
                    (let ((dir (string-append temp "/" (dirname location))))
                      (mkdir-p dir))
                    (parameterize ((current-output-port log))
-                     (build:svn-fetch (string-append (svn-multi-reference-url ref)
-                                                     "/" location)
+                     (with-imported-modules
+                         (source-module-closure '((guix build svn)
+                                                  (guix build utils)))
+                       #~(begin
+                           (use-modules (guix build svn)
+                                        (guix build utils))
+                           (svn-fetch (string-append (svn-multi-reference-url ref)
+                                                           "/" location)
                                       (svn-multi-reference-revision ref)
                                       (if (string-suffix? "/" location)
                                           (string-append temp "/" location)
                                           (string-append temp "/" (dirname location)))
+                                      #+(file-append svn "/bin/svn")
                                       #:recursive?
                                       (svn-multi-reference-recursive? ref)
                                       #:user-name (svn-multi-reference-user-name ref)
-                                      #:password (svn-multi-reference-password ref))))
+                                      #:password (svn-multi-reference-password ref))))))
                  (svn-multi-reference-locations ref))
           (add-to-store store name #t "sha256" temp)))))
 
-- 
2.41.0





Information forwarded to guix@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, rekado@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Feb 2024 14:51:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 05 09:51:51 2024
Received: from localhost ([127.0.0.1]:50864 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rX0K7-00047G-Fm
	for submit <at> debbugs.gnu.org; Mon, 05 Feb 2024 09:51:51 -0500
Received: from lists.gnu.org ([2001:470:142::17]:53788)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1rX0K2-00046y-JF
 for submit <at> debbugs.gnu.org; Mon, 05 Feb 2024 09:51:49 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <herman@HIDDEN>) id 1rX0Jk-00026z-2m
 for guix-patches@HIDDEN; Mon, 05 Feb 2024 09:51:28 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]
 helo=email.rimm.ee)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <herman@HIDDEN>) id 1rX0Jh-0004VO-W7
 for guix-patches@HIDDEN; Mon, 05 Feb 2024 09:51:27 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1707144678;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding;
 bh=ebsGNEzIBLzorxnIlklvh3gft8NVVe/Iya7B6jTm2xA=;
 b=nPI1ZE8q08TTqzMzOEtH9ClSGLNdz6WZdubS2rhmehnRZBDcrpG3I4d2bg4ZkCk4LE0S7U
 ul76EoSuYuEE82Mrh9XSynr6lPATTrSUhBEpWu6lSBC6JVUuzm+h2G/Mdwp69Ws1FJkszV
 pObmXOM9vT8q4FhLbdh+/ASOrObnIm0ok0TZTyFw5IyN17JDhqcTs+dJX5pO96Af1cs5vn
 hEF6QtsiypmHH/7sZDSVop7nfZNQkP70qL1J/wnWwIpX3u7lzkVZXwXMhAGWfF8oXsj8/s
 5CRsZxVD11X+2WjyFUZy752RWheGzPIeR9lJdnmvjcA6IOSRXhZV9PHCvyKT4Q==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 4453ab1a
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Mon, 5 Feb 2024 14:51:18 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/3] Add 'put' option to guix import.
Date: Mon,  5 Feb 2024 15:51:07 +0100
Message-ID: <cover.1707144190.git.herman@HIDDEN>
X-Mailer: git-send-email 2.41.0
MIME-Version: 1.0
X-Debbugs-Cc: Christopher Baines <guix@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=81.205.150.117; envelope-from=herman@HIDDEN;
 helo=email.rimm.ee
X-Spam_score_int: 12
X-Spam_score: 1.2
X-Spam_bar: +
X-Spam_report: (1.2 / 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, RCVD_IN_PBL=3.335, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001, TVD_RCVD_IP=0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
Cc: Herman Rimm <herman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

Hi all,

The first patch makes (svn-fetch) invoke svn from a native package
instead of one from the current PATH, if any. The third patch adds the
'put' option to 'guix import', so new package definitions get inserted
among existing definitions into e.g. gnu/packages/crates-io.scm. 

Cheers,
Herman

Herman Rimm (3):
  svn-fetch: Require svn-command argument.
  guix: import: Wrap package expressions with define-public.
  guix: import: Put packages into modules in alphabetical order.

 doc/guix.texi           | 14 +++++-
 guix/build/svn.scm      |  5 +--
 guix/scripts/import.scm | 96 ++++++++++++++++++++++++++++++-----------
 guix/svn-download.scm   | 35 +++++++++++----
 4 files changed, 111 insertions(+), 39 deletions(-)


base-commit: a3df20db8c3b9c819db7ca29bf014e2544e389d4
-- 
2.41.0





Acknowledgement sent to Herman Rimm <herman@HIDDEN>:
New bug report received and forwarded. Copy sent to guix@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, rekado@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN. Full text available.
Report forwarded to guix@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, rekado@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN:
bug#68935; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 16 Feb 2024 16:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.