GNU bug report logs -
#59048
[PATCH] guix: modify-input: Recommend prepend instead of append.
Previous Next
Reported by: Vivien Kraus <vivien <at> planete-kraus.eu>
Date: Sat, 5 Nov 2022 12:05:02 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Mon, 21 Nov 2022 14:36:21 +0000
with message-id <87wn7otlsl.fsf <at> cbaines.net>
and subject line Re: [bug#59048] [PATCH v2] guix: modify-input: Recommend prepend instead of append.
has caused the debbugs.gnu.org bug report #59048,
regarding [PATCH] guix: modify-input: Recommend prepend instead of append.
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
59048: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59048
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
* doc/guix.texi (Defining Package Variants): Document the "prepend" clause of
modify-inputs first.
* guix/packages.scm (modify-inputs): use "prepend" in the docstring.
---
doc/guix.texi | 12 ++++++------
guix/packages.scm | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 7806b21a0f..f818643ecd 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -8057,20 +8057,20 @@ following forms:
@item (delete @var{name}@dots{})
Delete from the inputs packages with the given @var{name}s (strings).
-@item (append @var{package}@dots{})
-Add @var{package}s to the end of the input list.
-
@item (prepend @var{package}@dots{})
Add @var{package}s to the front of the input list.
+
+@item (append @var{package}@dots{})
+Add @var{package}s to the end of the input list.
@end table
The example below removes the GMP and ACL inputs of Coreutils and adds
-libcap to the back of the input list:
+libcap to the front of the input list:
@lisp
(modify-inputs (package-inputs coreutils)
(delete "gmp" "acl")
- (append libcap))
+ (prepend libcap))
@end lisp
The example below replaces the @code{guile} package from the inputs of
@@ -8081,7 +8081,7 @@ The example below replaces the @code{guile} package from the inputs of
(replace "guile" guile-2.2))
@end lisp
-The last type of clause is @code{prepend}, to add inputs to the front of
+The last type of clause is @code{append}, to add inputs at the back of
the list.
@end deffn
diff --git a/guix/packages.scm b/guix/packages.scm
index 704b4ee710..502df7fdd1 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1176,9 +1176,9 @@ (define-syntax modify-inputs
(modify-inputs (package-inputs coreutils)
(delete \"gmp\" \"acl\")
- (append libcap))
+ (prepend libcap))
-Other types of clauses include 'prepend' and 'replace'.
+Other types of clauses include 'append' and 'replace'.
The first argument must be a labeled input list; the result is also a labeled
input list."
base-commit: 84d239599a10f31e7d414d962ae25888ab21165c
--
2.38.0
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
Vivien Kraus via Guix-patches via <guix-patches <at> gnu.org> writes:
> Most packages use prepend rather than append. If guix has to decide on an
> official policy, it should favor prepend.
>
> * doc/guix.texi (Defining Package Variants): Document the "prepend" clause of
> modify-inputs first.
> * guix/packages.scm (modify-inputs): use "prepend" in the docstring.
> ---
> doc/guix.texi | 12 ++++++------
> guix/packages.scm | 4 ++--
> 2 files changed, 8 insertions(+), 8 deletions(-)
I've now pushed this to master as
9283c80e604324f5449b5a8daf94285cdc6a8604.
For some reason, I think I pushed the v1 of the patch, that's my bad. I
think the changes are still fine, it's just I missed the commit message
changes here.
Chris
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 2 years and 244 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.