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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59048 in the body.
You can then email your comments to 59048 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#59048
; Package
guix-patches
.
(Sat, 05 Nov 2022 12:05:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Vivien Kraus <vivien <at> planete-kraus.eu>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 05 Nov 2022 12:05:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* 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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59048
; Package
guix-patches
.
(Sat, 05 Nov 2022 12:07:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 59048 <at> debbugs.gnu.org (full text, mbox):
On Sat Nov 5, 2022 at 11:59 AM GMT, Vivien Kraus via Guix-patches via wrote:
> * doc/guix.texi (Defining Package Variants): Document the "prepend" clause of
> modify-inputs first.
> * guix/packages.scm (modify-inputs): use "prepend" in the docstring.
LGTM :)
-- (
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59048
; Package
guix-patches
.
(Sat, 05 Nov 2022 19:19:02 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Vivien Kraus via Guix-patches via <guix-patches <at> gnu.org> writes:
> * 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(-)
This seems OK, but it would be good to know why you're wanting to change
this? In other words, how does this make things better?
This information would be good to have in the commit message (I usually
just write a sentance/paragraph above the changelog).
Thanks,
Chris
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59048
; Package
guix-patches
.
(Sat, 05 Nov 2022 19:19:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59048
; Package
guix-patches
.
(Sat, 05 Nov 2022 19:48:01 GMT)
Full text and
rfc822 format available.
Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello!
Le samedi 05 novembre 2022 à 20:17 +0100, Christopher Baines a écrit :
>
> Vivien Kraus via Guix-patches via <guix-patches <at> gnu.org> writes:
>
> > * 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(-)
>
> This seems OK, but it would be good to know why you're wanting to
> change
> this? In other words, how does this make things better?
I’m not sure of anything. What I gathered so far is:
- it could be more efficient;
- most instances in the packages use prepend rather than append:
$ grep -R '(modify-inputs' gnu -A 3 | grep '(append' | wc -l
34
$ grep -R '(modify-inputs' gnu -A 3 | grep '(prepend' | wc -l
128
I’m inviting ( in the discussion because the issue was raised in an IRC
discussion about a previous patch of mine (test).
Now, the old way I would reply to this message would be to attach an
updated patch, but since I have been told to send patches as emails
instead of attachments I don’t know how to proceed.
Vivien
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59048
; Package
guix-patches
.
(Sat, 05 Nov 2022 19:48:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59048
; Package
guix-patches
.
(Sat, 05 Nov 2022 19:52:02 GMT)
Full text and
rfc822 format available.
Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):
On Sat Nov 5, 2022 at 7:47 PM GMT, Vivien Kraus wrote:
> Now, the old way I would reply to this message would be to attach an
> updated patch, but since I have been told to send patches as emails
> instead of attachments I don’t know how to proceed.
The "Single Patches" section tells you how to send a v2 patchset; this
applies equally for multiple patches:
If you need to send a revised patch, don’t resend it like this or send a
“fix” patch to be applied on top of the last one; instead, use git commit -a
or git rebase to modify the commit, and use the ISSUE_NUMBER <at> debbugs.gnu.org
address and the -v flag with git send-email.
$ git commit -a
$ git send-email -1 -a --base=auto -v REVISION \
--to=ISSUE_NUMBER <at> debbugs.gnu.org
-- (
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59048
; Package
guix-patches
.
(Sat, 05 Nov 2022 19:52:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59048
; Package
guix-patches
.
(Sat, 05 Nov 2022 20:09:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 59048 <at> debbugs.gnu.org (full text, mbox):
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(-)
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: e5a0381e6defd9c1ffd1b57d9de7f31636c87b68
--
2.38.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59048
; Package
guix-patches
.
(Mon, 21 Nov 2022 14:39:01 GMT)
Full text and
rfc822 format available.
Message #32 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (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)]
Reply sent
to
Christopher Baines <mail <at> cbaines.net>
:
You have taken responsibility.
(Mon, 21 Nov 2022 14:39:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Vivien Kraus <vivien <at> planete-kraus.eu>
:
bug acknowledged by developer.
(Mon, 21 Nov 2022 14:39:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 20 Dec 2022 12:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 243 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.