diff mbox series

[bug#47484] : Use 'gtk-doc/stable' instead of 'gtk-doc' in native-inputs

Message ID 1c4c6ea95c20b74e020a762ac2618e87ceff1f81.camel@telenet.be
State New
Headers show
Series [bug#47484] : Use 'gtk-doc/stable' instead of 'gtk-doc' in native-inputs | expand

Checks

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

Commit Message

M March 29, 2021, 7:20 p.m. UTC
Hi Guix,

See: <https://lists.gnu.org/archive/html/guix-devel/2021-03/msg00538.html>

* Patch #1: Use 'gtk-doc/stable' instead of 'gtk-doc' in native-inputs

To test packages can still be built:

<start snip>
PACKAGES="thermald glimpse glib mate-desktop atril caja-extensions"
PACKAGES+=" mate-utils eom engrampa pluma mate-polkit"
PACKAGES+=" libgnt loudmouth denemo gsequencer libu2f-host libu2f-server"
PACKAGES+=" keybinder keybinder-3.0"

./pre-inst-env guix build $PACKAGES -M

# Output:
The following derivation will be built:
   /gnu/store/n84fwcigw3djfxv12iqv76bwp2gx9mnf-denemo-2.5.0.drv
The following files will be downloaded:
[...]

./pre-inst-env guix build denemo
[Bla bla.]
# Success!

<end snip>

To test no references to imagemagick or gtk-doc are retained:

./pre-inst-env guix graph --type=references $PACKAGES
# ^ search for imagemagick in output
# ^ TODO it should not be required to substitute $PACKAGES
#   first, as the 'references' information is in the narinfo.

* Patch #2: Export canonicalize-reference
* Patch #3: Add a '#:disallowed-references' argument to 'python-build'.

Used in later patches.

* Patch #4: Let 'python-sphinx' use 'imagemagick/stable'.

python-sphinx depends on imagemagick.  As (before this patch series),
many packages depend on 'python-sphinx' ...

<start snip>
guix refresh --list-dependent python-sphinx
Building the following 199 packages would ensure 427 dependent packages are rebuilt: [...]
<end snip>

... it may be worthwile to depend a /stable variant of python-sphinx,
and use it when sphinx is used only for generating the documentation.
However, defining a variant of python-sphinx is not required,
as python-sphinx does not retain its reference to imagemagick.

Thus, I simply replaced 'imagemagick' with 'imagemagick/stable' in the
inputs.  To make sure python-sphinx does not retain references to imagemagick/stable,
I added #:disallowed-references `(,imagemagick/stable) to #:arguments.

It is commented out in the patch to avoid rebuilds:

$ ./pre-inst-env guix build python-sphinx
> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
> 1.6 MB will be downloaded:
>    /gnu/store/sf2kdppaf8z2ri40rlp27l7ffkd8kvyf-python-sphinx-3.3.1
> substituting /gnu/store/sf2kdppaf8z2ri40rlp27l7ffkd8kvyf-python-sphinx-3.3.1...
> downloading from https://ci.guix.gnu.org/nar/lzip/sf2kdppaf8z2ri40rlp27l7ffkd8kvyf-python-sphinx-3.3.1 ...
>  python-sphinx-3.3.1  1.5MiB                                    121KiB/s 00:13 [##################] 100.0%
> [...]

When uncommented, 'python-sphinx' still builds.


* Patch #5 .. #10: I replaced imagemagick with imagemagick/stable in some packages

* After this patch series: how many packages would be rebuild if imagemagick
  is updated?

$ ./pre-inst-env guix refresh --list-dependent imagemagick@6.9.12-4
> Building the following 47 packages would ensure 73 dependent packages are rebuilt: [..]

Also, I verified ./pre-inst-env guix build guix still succeeds.

Greetings,
Maxime.

Comments

Mark H Weaver April 1, 2021, 6:56 p.m. UTC | #1
Hi Maxime,

Thanks so much for taking this on.  The reason for my delayed response
is that I'm a bit nervous about using these known-buggy "*/stable"
packages more comprehensively until we have a better understanding of
<https://bugs.gnu.org/47479> and how to address it.

      Mark
diff mbox series

Patch

From d7e7187f2387424d6b37e903efe4aed809733dd4 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Mon, 29 Mar 2021 20:14:35 +0200
Subject: [PATCH 10/10] gnu: inkscape-1.0: Do *not* yet use
 'imagemagick/stable'.

First, <https://issues.guix.gnu.org/47479> will have to be fixed.

* gnu/packages/inkscape (inkscape-1.0)[native-inputs]: Do not yet
  replace 'imagemagick' with 'imagemagick/stable', as 'imagemagick'
  ends up in the closure.
---
 gnu/packages/inkscape.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm
index 075f901b2d..3b774ceaa1 100644
--- a/gnu/packages/inkscape.scm
+++ b/gnu/packages/inkscape.scm
@@ -7,6 +7,7 @@ 
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2020 Boris A. Dekshteyn <boris.dekshteyn@gmail.com>
 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
+;;; Copyright © 2021 Maxim Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -221,6 +222,11 @@  endif()~%~%"
        #:modules ((guix build cmake-build-system)
                   ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
                   (guix build utils))
+       ;; TODO: uncomment this when <https://issues.guix.gnu.org/47479>
+       ;; has been fixed.
+       ;; Prevent the 'imagemagick/stable' package from ending
+       ;; up in the closure.
+       ;; #:disallowed-references (,imagemagick/stable)
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-icon-cache-generator
@@ -291,6 +297,9 @@  endif()~%~%"
        ("python-numpy" ,python-numpy)
        ("python-lxml" ,python-lxml)))
     (native-inputs
+     ;; TODO: it would be nice to use 'imagemagick/stable' here,
+     ;; but that is not possible yet.  See
+     ;; <https://issues.guix.gnu.org/47479>.
      `(("imagemagick" ,imagemagick)     ;for tests
        ("intltool" ,intltool)
        ("glib" ,glib "bin")
-- 
2.31.1