diff mbox series

[bug#46866] gnu: b4: Fix setup.py version incompatibility.

Message ID YEctPxAc/y/aIcet@3900XT
State Accepted
Headers show
Series [bug#46866] gnu: b4: Fix setup.py version incompatibility. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Efraim Flashner March 9, 2021, 8:09 a.m. UTC
Indeed, it does fail at startup. Two things about your patch, you've
added a patch file but didn't register it in gnu/local.mk. This means
it'll get dropped during a 'make dist' which would be a problem. The
second is that it's a lot of patch for a small amount of code change.
With your permission I'd like to commit the attached patch instead.

Comments

Kyle Meyer March 9, 2021, 10:54 p.m. UTC | #1
Efraim Flashner writes:

> Indeed, it does fail at startup. Two things about your patch, you've
> added a patch file but didn't register it in gnu/local.mk. This means
> it'll get dropped during a 'make dist' which would be a problem.

Doh, thanks for catching that.

> The second is that it's a lot of patch for a small amount of code
> change.

I like that a patch fails loudly once it's no longer valid, but I'm
happy to defer to your opinion that it's an overkill here (and will try
to recalibrate for future patches).

> With your permission I'd like to commit the attached patch instead.
[...]
> From: Kyle Meyer <kyle@kyleam.com>
> Date: Tue, 9 Mar 2021 10:06:13 +0200
> Subject: [PATCH] gnu: b4: Fix setup.py version incompatibility.
>
> * gnu/packages/version-control.scm (b4)[source]: Add snippet to not
> require too specific of a version.
>
> Co-authored with Efraim Flashner <efraim@flashner.co.il>
>
> Signed-off-by: Efraim Flashner <efraim@flashner.co.il>

Sounds fine to me.  I have a slight preference that you put yourself as
the author and put a

  Noticed-by: Kyle Meyer <kyle@kyleam.com>

or

  Reported-by: Kyle Meyer <kyle@kyleam.com>

trailer for me, but either way is okay.

> @@ -2347,7 +2347,15 @@ based on a manifest file published by servers.")
>         (method url-fetch)
>         (uri (pypi-uri "b4" version))
>         (sha256
> -        (base32 "1j904dy9cwxl85k2ngc498q5cdnqwsmw3jibjr1m55w8aqdck68z"))))
> +        (base32 "1j904dy9cwxl85k2ngc498q5cdnqwsmw3jibjr1m55w8aqdck68z"))
> +       (modules '((guix build utils)))
> +       (snippet
> +        '(begin
> +           ;; Fixes issue with dependency requirements being too strict. See upstream commit:
> +           ;; https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?id=31348a14afdb1d39e7faf9576eaddea1ced76e19
> +           (substitute* "setup.py"
> +             (("\\.0'") "'"))

Just a note: This won't catch a similar problem if dkimpy (1.0.5) is
upgraded before b4, though perhaps that's unlikely and not worth
worrying about.

Thank you for the review.
Efraim Flashner March 16, 2021, 12:29 p.m. UTC | #2
On Tue, Mar 09, 2021 at 05:54:04PM -0500, Kyle Meyer wrote:
> Efraim Flashner writes:
> 
> > Indeed, it does fail at startup. Two things about your patch, you've
> > added a patch file but didn't register it in gnu/local.mk. This means
> > it'll get dropped during a 'make dist' which would be a problem.
> 
> Doh, thanks for catching that.
> 
> > The second is that it's a lot of patch for a small amount of code
> > change.
> 
> I like that a patch fails loudly once it's no longer valid, but I'm
> happy to defer to your opinion that it's an overkill here (and will try
> to recalibrate for future patches).
> 
> > With your permission I'd like to commit the attached patch instead.
> [...]
> > From: Kyle Meyer <kyle@kyleam.com>
> > Date: Tue, 9 Mar 2021 10:06:13 +0200
> > Subject: [PATCH] gnu: b4: Fix setup.py version incompatibility.
> >
> > * gnu/packages/version-control.scm (b4)[source]: Add snippet to not
> > require too specific of a version.
> >
> > Co-authored with Efraim Flashner <efraim@flashner.co.il>
> >
> > Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
> 
> Sounds fine to me.  I have a slight preference that you put yourself as
> the author and put a
> 
>   Noticed-by: Kyle Meyer <kyle@kyleam.com>
> 
> or
> 
>   Reported-by: Kyle Meyer <kyle@kyleam.com>
> 
> trailer for me, but either way is okay.
> 
> > @@ -2347,7 +2347,15 @@ based on a manifest file published by servers.")
> >         (method url-fetch)
> >         (uri (pypi-uri "b4" version))
> >         (sha256
> > -        (base32 "1j904dy9cwxl85k2ngc498q5cdnqwsmw3jibjr1m55w8aqdck68z"))))
> > +        (base32 "1j904dy9cwxl85k2ngc498q5cdnqwsmw3jibjr1m55w8aqdck68z"))
> > +       (modules '((guix build utils)))
> > +       (snippet
> > +        '(begin
> > +           ;; Fixes issue with dependency requirements being too strict. See upstream commit:
> > +           ;; https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?id=31348a14afdb1d39e7faf9576eaddea1ced76e19
> > +           (substitute* "setup.py"
> > +             (("\\.0'") "'"))
> 
> Just a note: This won't catch a similar problem if dkimpy (1.0.5) is
> upgraded before b4, though perhaps that's unlikely and not worth
> worrying about.
> 
> Thank you for the review.

Not sure how I forgot I had this waiting for me. I changed the
substitution from "\\.0'" to change the ~= to >= and pushed it.
diff mbox series

Patch

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 8292a5df15..4051efed9c 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -7,7 +7,7 @@ 
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2016, 2019 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2015, 2018, 2020 Kyle Meyer <kyle@kyleam.com>
+;;; Copyright © 2015, 2018, 2020, 2021 Kyle Meyer <kyle@kyleam.com>
 ;;; Copyright © 2015, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016, 2017, 2018 Nikita <nikita@n0.is>
@@ -2347,7 +2347,15 @@  based on a manifest file published by servers.")
        (method url-fetch)
        (uri (pypi-uri "b4" version))
        (sha256
-        (base32 "1j904dy9cwxl85k2ngc498q5cdnqwsmw3jibjr1m55w8aqdck68z"))))
+        (base32 "1j904dy9cwxl85k2ngc498q5cdnqwsmw3jibjr1m55w8aqdck68z"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Fixes issue with dependency requirements being too strict. See upstream commit:
+           ;; https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?id=31348a14afdb1d39e7faf9576eaddea1ced76e19
+           (substitute* "setup.py"
+             (("\\.0'") "'"))
+           #t))))
     (build-system python-build-system)
     (arguments '(#:tests? #f))          ; No tests.
     (inputs