GNU bug report logs -
#69530
[PATCH] doc: cookbook: Update "Build system arguments" section.
Previous Next
Reported by: rimarko <at> libero.it
Date: Sun, 3 Mar 2024 18:40:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 69530 in the body.
You can then email your comments to 69530 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#69530
; Package
guix-patches
.
(Sun, 03 Mar 2024 18:40:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
rimarko <at> libero.it
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sun, 03 Mar 2024 18:40:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Marco Rimoldi <rimarko <at> libero.it>
* doc/guix-cookbook.texi (Build system arguments)
Remove recommendation on phase return value.
Ensure code examples can run and are up-to-date.
Change-Id: I143babf79983751578d6d4e20b20195ea000656d
---
doc/guix-cookbook.texi | 37 +++++++++++++++++++++++--------------
1 file changed, 23 insertions(+), 14 deletions(-)
diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi
index 2366c13caf..7835d64dcb 100644
--- a/doc/guix-cookbook.texi
+++ b/doc/guix-cookbook.texi
@@ -1246,6 +1246,7 @@ Extended example
validate-documentation-location
delete-info-dir-file
patch-dot-desktop-files
+ make-dynamic-linker-cache
install-license-files
reset-gzip-timestamps
compress-documentation)))
@@ -1256,8 +1257,8 @@ Extended example
@lisp
(add-to-load-path "/path/to/guix/checkout")
,use (guix build gnu-build-system)
-(map first %standard-phases)
-@result{} (set-SOURCE-DATE-EPOCH set-paths install-locale unpack bootstrap patch-usr-bin-file patch-source-shebangs configure patch-generated-file-shebangs build check install patch-shebangs strip validate-runpath validate-documentation-location delete-info-dir-file patch-dot-desktop-files install-license-files reset-gzip-timestamps compress-documentation)
+(map car %standard-phases)
+@result{} (set-SOURCE-DATE-EPOCH set-paths install-locale unpack bootstrap patch-usr-bin-file patch-source-shebangs configure patch-generated-file-shebangs build check install patch-shebangs strip validate-runpath validate-documentation-location delete-info-dir-file patch-dot-desktop-files make-dynamic-linker-cache install-license-files reset-gzip-timestamps compress-documentation)
@end lisp
If you want to know more about what happens during those phases, consult the
@@ -1279,13 +1280,25 @@ Extended example
;; Preserve timestamps (set to the Epoch) on the copied tree so that
;; things work deterministically.
(copy-recursively source "."
- #:keep-mtime? #true))
+ #:keep-mtime? #t)
+ ;; Make the source checkout files writable, for convenience.
+ (for-each (lambda (f)
+ (false-if-exception (make-file-writable f)))
+ (find-files ".")))
(begin
- (if (string-suffix? ".zip" source)
- (invoke "unzip" source)
- (invoke "tar" "xvf" source))
- (chdir (first-subdirectory "."))))
- #true)
+ (cond
+ ((string-suffix? ".zip" source)
+ (invoke "unzip" source))
+ ((tarball? source)
+ (invoke "tar" "xvf" source))
+ (else
+ (let ((name (strip-store-file-name source))
+ (command (compressor source)))
+ (copy-file source name)
+ (when command
+ (invoke command "--decompress" name)))))
+ ;; Attempt to change into child directory.
+ (and=> (first-subdirectory ".") chdir))))
@end lisp
Note the @code{chdir} call: it changes the working directory to where the source was
@@ -1321,14 +1334,10 @@ Extended example
(let ((bash-directory (assoc-ref inputs "bash"))
(output-directory (assoc-ref outputs "out"))
(doc-directory (assoc-ref outputs "doc")))
- ;; ...
- #true))
+ ;; ... ))
@end lisp
-The procedure must return @code{#true} on success. It's brittle to rely on the return
-value of the last expression used to tweak the phase because there is no
-guarantee it would be a @code{#true}. Hence the trailing @code{#true} to ensure the right value
-is returned on success.
+Its return value is ignored.
@subsubsection Code staging
base-commit: f00f56514d90ebba5d9e08ec786c8118e437097c
--
2.41.0
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Sat, 11 Jan 2025 18:38:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
rimarko <at> libero.it
:
bug acknowledged by developer.
(Sat, 11 Jan 2025 18:38:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 69530-done <at> debbugs.gnu.org (full text, mbox):
Hi,
rimarko <at> libero.it skribis:
> From: Marco Rimoldi <rimarko <at> libero.it>
>
> * doc/guix-cookbook.texi (Build system arguments)
>
> Remove recommendation on phase return value.
> Ensure code examples can run and are up-to-date.
>
> Change-Id: I143babf79983751578d6d4e20b20195ea000656d
This patch had fallen through the cracks. Finally applied, thanks!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 09 Feb 2025 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 29 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.