[Suggestion] Add option --with-patch

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Ludovic Courtès
  • Philippe SWARTVAGHER
Owner
unassigned
Submitted by
Philippe SWARTVAGHER
Severity
normal
P
P
Philippe SWARTVAGHER wrote on 17 Dec 2020 12:42
(address . bug-guix@gnu.org)
603c5016-6eb1-4305-2825-ed0bacf66025@inria.fr
Hello,

We already have `--with-branch=`, `with-commit=`, ... An additional
option could be `--with-patch=package=add-extra-feature.patch` which
would apply the patch file `add-extra-feature.patch` located in the my
current directory to the sources of `package` before Guix starts
building `package`.

This would bring the possibility to easily share patches (for tests,
reviews, ... for instance) without having to commit the patch in the
source repository of the package, without changing the package
definition, and without applying ourselves the patch to our local source
repository of the package.

Thanks !

--
Philippe SWARTVAGHER

PhD Student
TADaaM team, Inria Bordeaux Sud-Ouest
L
L
Ludovic Courtès wrote on 21 Dec 2020 14:57
[PATCH] Add option --with-patch
(name . Philippe SWARTVAGHER)(address . philippe.swartvagher@inria.fr)(address . 45300@debbugs.gnu.org)
87tusf6z31.fsf@gnu.org
Hi Philippe,

Philippe SWARTVAGHER <philippe.swartvagher@inria.fr> skribis:

Toggle quote (6 lines)
> We already have `--with-branch=`, `with-commit=`, ... An additional
> option could be `--with-patch=package=add-extra-feature.patch` which
> would apply the patch file `add-extra-feature.patch` located in the my
> current directory to the sources of `package` before Guix starts
> building `package`.

Good idea! The patch below does that.

Feedback welcome. :-)

Ludo’.
L
L
Ludovic Courtès wrote on 27 Dec 2020 17:25
(name . Philippe SWARTVAGHER)(address . philippe.swartvagher@inria.fr)(address . 45300-done@debbugs.gnu.org)
877dp3tdvc.fsf@gnu.org
Ludovic Courtès <ludovic.courtes@inria.fr> skribis:

Toggle quote (15 lines)
>>From 12c8df7c61537e3834fac4bf0e8e340cbac2d2df Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludovic.courtes@inria.fr>
> Date: Mon, 21 Dec 2020 14:52:38 +0100
> Subject: [PATCH] transformations: Add '--with-patch'.
>
> Suggested by Philippe Swartvagher <philippe.swartvagher@inria.fr>.
>
> * guix/transformations.scm (transform-package-patches): New procedure.
> (%transformations): Add it as 'with-patch'.
> (%transformation-options, show-transformation-options-help/detailed):
> Add '--with-patch'.
> * tests/transformations.scm ("options->transformation, with-patch"): New
> test.
> * doc/guix.texi (Package Transformation Options): Document it.

Pushed as e38d90d497e19e00263fa28961c688a433154386!

Ludo’.
Closed
?