From unknown Sat Jul 12 18:33:23 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#58230 <58230@debbugs.gnu.org> To: bug#58230 <58230@debbugs.gnu.org> Subject: Status: [PATCH] build: copy-build-system: Add #:output filter. Reply-To: bug#58230 <58230@debbugs.gnu.org> Date: Sun, 13 Jul 2025 01:33:23 +0000 retitle 58230 [PATCH] build: copy-build-system: Add #:output filter. reassign 58230 guix-patches submitter 58230 Hilton Chain severity 58230 normal tag 58230 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 01 11:47:30 2022 Received: (at submit) by debbugs.gnu.org; 1 Oct 2022 15:47:30 +0000 Received: from localhost ([127.0.0.1]:45599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeeiA-0002vD-07 for submit@debbugs.gnu.org; Sat, 01 Oct 2022 11:47:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:44288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeei8-0002v5-13 for submit@debbugs.gnu.org; Sat, 01 Oct 2022 11:47:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeei7-0001Ng-Rw for guix-patches@gnu.org; Sat, 01 Oct 2022 11:47:27 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:57556) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeei6-0000yB-7N for guix-patches@gnu.org; Sat, 01 Oct 2022 11:47:27 -0400 Date: Sat, 01 Oct 2022 23:46:44 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1664639240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tsn4ewYFUTqURAFbzVi0bM7oHXrRVTRFUc75WouV60E=; b=u5gesgngeI8YM+xESfE+kFZvkEz53XuZohPkqcpv2FBGYH+Lsk2SoZediMSvzK/sU2UMGW Fbzzhs341GeM6CDT1CnPE5xZjiHRA5tXc2+LEMo1f/jUKSslCvscxOP2FINDUhmzYZotIN J0eWzGCwUF/fTsvigweOdnKwQuUxW1YiR59EUAB1DDBQgVyGC5YFWwfFDLlLLwSL/DVSFi 81MhWDrn9QNsJsRj8jV/d1MmHdhRWcxNvkiePP+S5vE1LjyjMNqholuU9moPU0850L0IAt eMTNAKYMoeCl3s1mua/o4FJvxWXW8uq84ZBa0mrS+dc4vYr0qnfx4jQ88PrbBg== Message-ID: From: Hilton Chain To: guix-patches@gnu.org Subject: [PATCH] build: copy-build-system: Add #:output filter. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space X-Spamd-Bar: / Received-SPF: pass client-ip=144.168.59.46; envelope-from=hako@ultrarare.space; helo=mail.boiledscript.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * guix/build/copy-build-system.scm (install): Add #:output filter. --- guix/build/copy-build-system.scm | 49 +++++++++++++++++++------------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/guix/build/copy-build-system.scm b/guix/build/copy-build-system.scm index fb2d1db056..111032eed8 100644 --- a/guix/build/copy-build-system.scm +++ b/guix/build/copy-build-system.scm @@ -54,7 +54,7 @@ (define* (install #:key install-plan outputs #:allow-other-keys) - Without FILTERS, install the full SOURCE _content_ to TARGET. The paths relative to SOURCE are preserved within TARGET. - With FILTERS among `#:include`, `#:include-regexp`, `#:exclude`, - `#:exclude-regexp`: + `#:exclude-regexp`, `#:output`: - With `#:include`, install only the paths which suffix exactly matches one of the elements in the list. - With `#:include-regexp`, install subpaths matching the regexps in the list. @@ -62,6 +62,8 @@ (define* (install #:key install-plan outputs #:allow-other-keys) install every subpath but the files matching the `#:exclude*` filters. If both `#:include*` and `#:exclude*` are specified, the exclusion is done on the inclusion list. + - With `#:output`, install into TARGET of every specified output(s), the + default value is \"out\". Examples: @@ -72,7 +74,13 @@ (define* (install #:key install-plan outputs #:allow-other-keys) - `(\"foo/\" \"share/my-app\" #:include (\"sub/file\"))`: Install only \"foo/sub/file\" to \"share/my-app/sub/file\". - `(\"foo/sub\" \"share/my-app\" #:include (\"file\"))`: Install \"foo/sub/file\" to -\"share/my-app/file\"." +\"share/my-app/file\". +- As the previout example, when not specifying `#:output`: Install \"foo/sub/file\" to +\"share/my-app/file\" of \"out\" output. +- `(\"foo/sub\" \"share/my-app\" #:include (\"file\")) #:output (\"lib\")`: Install +\"foo/sub/file\" to \"share/my-app/file\" of \"lib\" output. +- `(\"foo/sub\" \"share/my-app\" #:include (\"file\")) #:output (\"out\"\"lib\")`: +Install \"foo/sub/file\" to \"share/my-app/file\" of both \"out\" and \"lib\" outputs." (define (install-simple source target) "Install SOURCE to TARGET. TARGET must point to a store location. @@ -133,23 +141,26 @@ (define* (install-file-list source target #:key include exclude include-regexp e (string-append target "/"))) file-list)))) - (define* (install source target #:key include exclude include-regexp exclude-regexp) - (let ((final-target (string-append (assoc-ref outputs "out") "/" target)) - (filters? (or include exclude include-regexp exclude-regexp))) - (when (and (not (file-is-directory? source)) - filters?) - (error "Cannot use filters when SOURCE is a file.")) - (let ((multi-files-in-source? - (or (string-suffix? "/" source) - (and (file-is-directory? source) - filters?)))) - (if multi-files-in-source? - (install-file-list source final-target - #:include include - #:exclude exclude - #:include-regexp include-regexp - #:exclude-regexp exclude-regexp) - (install-simple source final-target))))) + (define* (install source target #:key include exclude include-regexp exclude-regexp (output '("out"))) + (for-each + (lambda (out) + (let ((final-target (string-append (assoc-ref outputs out) "/" target)) + (filters? (or include exclude include-regexp exclude-regexp))) + (when (and (not (file-is-directory? source)) + filters?) + (error "Cannot use filters when SOURCE is a file.")) + (let ((multi-files-in-source? + (or (string-suffix? "/" source) + (and (file-is-directory? source) + filters?)))) + (if multi-files-in-source? + (install-file-list source final-target + #:include include + #:exclude exclude + #:include-regexp include-regexp + #:exclude-regexp exclude-regexp) + (install-simple source final-target))))) + output)) (for-each (lambda (plan) (apply install plan)) install-plan) #t) base-commit: 225e00bd1925487fb045d9184fd249d93accad08 -- 2.37.3 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 06 01:07:31 2024 Received: (at control) by debbugs.gnu.org; 6 Jan 2024 06:07:31 +0000 Received: from localhost ([127.0.0.1]:58430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLzqE-0005GQ-RZ for submit@debbugs.gnu.org; Sat, 06 Jan 2024 01:07:31 -0500 Received: from mail.boiledscript.com ([144.168.59.46]:41592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLzqD-0005GH-By for control@debbugs.gnu.org; Sat, 06 Jan 2024 01:07:29 -0500 Date: Sat, 06 Jan 2024 14:07:15 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1704521213; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=muD9yiScrU8K+1SA6j13effMr4vBPimRwiRaw93HNlc=; b=xsPIdgaD8wUF/fMqlBFytFlC2qdCs+Eruu24Q67mQ6mcm+EyiouU689zRznmQlYIMfpW2Z svH3g1C5WjZwVGWMVQMaHGC4YCv/j9/ncPs122U9YmWDRMuzm99BCteUq5tHsk7KQUeD9v GJNP9xSop6v1dSC96nQn728IpzTpCPbfjKmfu01wUZmScH3o85m86t9lJ2yHRfmx1gQB/O ipPw02dKh5zt7wh/qP40fMT25vZyrIvN3C+vI4DS3kHXED1rxNBkyzBlbGceSVWIKBHv11 uDKRJr6OPXrZXRR5pzfOqMREMuxPMERH0/OP9d19u33L0KsxmJ+IkGneXa5/cQ== Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space Message-ID: <87v887t2p8.wl-hako@ultrarare.space> To: control@debbugs.gnu.org Subject: control message for bug #58230 From: Hilton Chain MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spamd-Bar: / X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 58230 quit From unknown Sat Jul 12 18:33:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 03 Feb 2024 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator