[PATCH] Move diffoscope from package-management to it's own module.

DoneSubmitted by Vagrant Cascadian.
Details
3 participants
  • Danny Milosavljevic
  • Ludovic Courtès
  • Vagrant Cascadian
Owner
unassigned
Severity
normal
V
V
Vagrant Cascadian wrote on 9 Sep 2019 01:35
(address . guix-patches@gnu.org)
87ftl6cqfc.fsf@yucca
I was having infinite recursion issues importing additional modules suchas android.scm, bootloaders.scm and statistics.scm intopackage-management.scm with use-modules calls, along these lines:
error: googletest: unbound variablehint: Did you forget a `use-modules' form?...error: curl: unbound variablehint: Did you forget a `use-modules' form?
guix build: error: diffoscope: unknown package
Moving diffoscope to it's own package module seemed to at least workaround the issue. Diffoscope itself attempts to deal with an arbitraryand growing number of file types, so pulls in quite a few other packagemodules, so at least splitting it into a separate module might limit theimpacts on other modules.
Attached are two patches attempting the split; comments welcome!
The first patch is the move itself, and also moves trydiffoscope; thesecond patch adds the package modules that previously would fail toimport properly before the move.
This allows diffoscope to run a few additional tests, getting the testsuite down to only about 68 skipped tests (and falling); it was around140 skipped tests before I started this mad rush...

live well, vagrant
From 352058f2ef002e77df6633c00ba009088bf5e8bd Mon Sep 17 00:00:00 2001From: Vagrant Cascadian <vagrant@reproducible-builds.org>Date: Sun, 8 Sep 2019 14:36:33 -0700Subject: [PATCH 1/2] gnu: Move diffoscope and trydiffoscope to new diffoscope.scm.
* gnu/packages/package-management (diffoscope): Remove variable. (trydiffoscope): Remove variable. (use-modules): Remove modules only needed by diffoscope. Update copyright information.* gnu/packages/diffoscope.scm: New file. (diffoscope): Add variable. (trydiffoscope): Add variable.* gnu/local.mk [GNU_SYSTEM_MODULES]: Add diffoscope.scm.--- gnu/local.mk | 1 + gnu/packages/diffoscope.scm | 231 ++++++++++++++++++++++++++++ gnu/packages/package-management.scm | 183 ---------------------- 3 files changed, 232 insertions(+), 183 deletions(-) create mode 100644 gnu/packages/diffoscope.scm
Toggle diff (495 lines)diff --git a/gnu/local.mk b/gnu/local.mkindex b7a5ef825b..e15c50be45 100644--- a/gnu/local.mk+++ b/gnu/local.mk@@ -143,6 +143,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/dejagnu.scm \ %D%/packages/dico.scm \ %D%/packages/dictionaries.scm \+ %D%/packages/diffoscope.scm \ %D%/packages/digest.scm \ %D%/packages/direct-connect.scm \ %D%/packages/disk.scm \diff --git a/gnu/packages/diffoscope.scm b/gnu/packages/diffoscope.scmnew file mode 100644index 0000000000..6eb5c1d9fe--- /dev/null+++ b/gnu/packages/diffoscope.scm@@ -0,0 +1,231 @@+;;; GNU Guix --- Functional package management for GNU+;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>+;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>+;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>+;;; Copyright © 2018, 2019 Rutger Helling <rhelling@mykolab.com>+;;; Copyright © 2019 Vagrant Cascadian <vagrant@reproducible-builds.org>+;;;+;;; This file is part of GNU Guix.+;;;+;;; GNU Guix is free software; you can redistribute it and/or modify it+;;; under the terms of the GNU General Public License as published by+;;; the Free Software Foundation; either version 3 of the License, or (at+;;; your option) any later version.+;;;+;;; GNU Guix is distributed in the hope that it will be useful, but+;;; WITHOUT ANY WARRANTY; without even the implied warranty of+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+;;; GNU General Public License for more details.+;;;+;;; You should have received a copy of the GNU General Public License+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.++(define-module (gnu packages diffoscope)+ #:use-module (gnu packages)+ #:use-module (gnu packages acl)+ #:use-module (gnu packages admin)+ #:use-module (gnu packages backup)+ #:use-module (gnu packages base)+ #:use-module (gnu packages cdrom)+ #:use-module (gnu packages check)+ #:use-module (gnu packages compression)+ #:use-module (gnu packages cpio)+ #:use-module (gnu packages dbm)+ #:use-module (gnu packages gettext)+ #:use-module (gnu packages ghostscript)+ #:use-module (gnu packages gnome)+ #:use-module (gnu packages gnupg)+ #:use-module (gnu packages haskell)+ #:use-module (gnu packages image)+ #:use-module (gnu packages imagemagick)+ #:use-module (gnu packages java)+ #:use-module (gnu packages linux)+ #:use-module (gnu packages llvm)+ #:use-module (gnu packages mono)+ #:use-module (gnu packages package-management)+ #:use-module (gnu packages patchutils)+ #:use-module (gnu packages pdf)+ #:use-module (gnu packages python-web)+ #:use-module (gnu packages python-xyz)+ #:use-module (gnu packages sqlite)+ #:use-module (gnu packages ssh)+ #:use-module (gnu packages textutils)+ #:use-module (gnu packages video)+ #:use-module (gnu packages vim)+ #:use-module (guix build-system python)+ #:use-module (guix gexp)+ #:use-module (guix git-download)+ #:use-module ((guix licenses) #:prefix license:)+ #:use-module (guix packages)+ #:use-module (guix utils))++(define-public diffoscope+ (let ((version "123"))+ (package+ (name "diffoscope")+ (version version)+ (source (origin+ (method git-fetch)+ (uri (git-reference+ (url "https://salsa.debian.org/reproducible-builds/diffoscope.git")+ (commit version)))+ (file-name (git-file-name name version))+ (sha256+ (base32+ "11bxms5rkhi0v4pxx29v4qgvhp3fmf0fkzci6gn5xcv4fl1zy4wj"))))+ (build-system python-build-system)+ (arguments+ `(#:phases (modify-phases %standard-phases+ ;; setup.py mistakenly requires python-magic from PyPi, even+ ;; though the Python bindings of `file` are sufficient.+ ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844+ (add-after 'unpack 'dependency-on-python-magic+ (lambda _+ (substitute* "setup.py"+ (("'python-magic',") ""))))+ ;; This test is broken because our `file` package has a+ ;; bug in berkeley-db file type detection.+ (add-after 'unpack 'remove-berkeley-test+ (lambda _+ (delete-file "tests/comparators/test_berkeley_db.py")+ #t))+ ;; Test is dynamically generated and may have false+ ;; negatives with different ocaml versions. Further+ ;; background in: https://bugs.debian.org/939386+ (add-after 'unpack 'remove-ocaml-test+ (lambda _+ (delete-file "tests/comparators/test_ocaml.py")+ #t))+ (add-after 'unpack 'embed-tool-references+ (lambda* (#:key inputs #:allow-other-keys)+ (substitute* "diffoscope/comparators/utils/compare.py"+ (("\\['xxd',")+ (string-append "['" (which "xxd") "',")))+ (substitute* "diffoscope/comparators/elf.py"+ (("@tool_required\\('readelf'\\)") "")+ (("get_tool_name\\('readelf'\\)")+ (string-append "'" (which "readelf") "'")))+ (substitute* "diffoscope/comparators/directory.py"+ (("@tool_required\\('stat'\\)") "")+ (("@tool_required\\('getfacl'\\)") "")+ (("\\['stat',")+ (string-append "['" (which "stat") "',"))+ (("\\['getfacl',")+ (string-append "['" (which "getfacl") "',")))+ #t))+ (add-before 'check 'writable-test-data+ (lambda _+ ;; tests may need needs write access to tests+ ;; directory+ (for-each make-file-writable (find-files "tests"))+ #t))+ (add-before 'check 'delete-failing-test+ (lambda _+ ;; this requires /sbin to be on the path+ (delete-file "tests/test_tools.py")+ #t)))))+ (inputs `(("rpm" ,rpm) ;for rpm-python+ ("python-file" ,python-file)+ ("python-debian" ,python-debian)+ ("python-libarchive-c" ,python-libarchive-c)+ ("python-tlsh" ,python-tlsh)+ ("acl" ,acl) ;for getfacl+ ("colordiff" ,colordiff)+ ("xxd" ,xxd)))+ ;; Below are modules used for tests.+ (native-inputs `(("python-pytest" ,python-pytest)+ ("python-chardet" ,python-chardet)+ ;; test suite skips tests when tool is missing+ ("bdb" ,bdb)+ ("binutils" ,binutils)+ ("bzip2" ,bzip2)+ ("cdrtools" ,cdrtools)+ ("colord" ,colord)+ ("cpio" ,cpio)+ ("docx2txt" ,docx2txt)+ ("e2fsprogs" ,e2fsprogs)+ ("ffmpeg" ,ffmpeg)+ ("gettext" ,gettext-minimal)+ ("ghc" ,ghc)+ ("ghostscript" ,ghostscript)+ ("giflib:bin" ,giflib "bin")+ ("gnumeric" ,gnumeric)+ ("gnupg" ,gnupg)+ ("imagemagick" ,imagemagick)+ ("libarchive" ,libarchive)+ ("llvm" ,llvm)+ ("lz4" ,lz4)+ ("mono" ,mono)+ ("odt2txt" ,odt2txt)+ ;; no unversioned openjdk available+ ("openjdk:jdk" ,openjdk12 "jdk")+ ("openssh" ,openssh)+ ("pgpdump" ,pgpdump)+ ("poppler" ,poppler)+ ("rpm" ,rpm)+ ("sng" ,sng)+ ("sqlite" ,sqlite)+ ("squashfs-tools" ,squashfs-tools)+ ("tcpdump" ,tcpdump)+ ("unzip" ,unzip)+ ("xxd" ,xxd)+ ("xz" ,xz)+ ("zip" ,zip)))+ (home-page "https://diffoscope.org/")+ (synopsis "Compare files, archives, and directories in depth")+ (description+ "Diffoscope tries to get to the bottom of what makes files or directories+different. It recursively unpacks archives of many kinds and transforms+various binary formats into more human readable forms to compare them. It can+compare two tarballs, ISO images, or PDFs just as easily.")+ (license license:gpl3+))))++(define-public trydiffoscope+ (package+ (name "trydiffoscope")+ (version "67.0.1")+ (source+ (origin+ (method git-fetch)+ (uri (git-reference+ (url "https://salsa.debian.org/reproducible-builds/trydiffoscope.git")+ (commit version)))+ (file-name (git-file-name name version))+ (sha256+ (base32+ "03b66cjii7l2yiwffj6ym6mycd5drx7prfp4j2550281pias6mjh"))))+ (arguments+ `(#:phases+ (modify-phases %standard-phases+ (add-after 'install 'install-doc+ (lambda* (#:key outputs #:allow-other-keys)+ (let* ((share (string-append (assoc-ref outputs "out") "/share/")))+ (mkdir-p (string-append share "/man/man1/" ))+ (invoke "rst2man.py"+ "trydiffoscope.1.rst"+ (string-append share "/man/man1/trydiffoscope.1"))+ (mkdir-p (string-append share "/doc/" ,name "-" ,version))+ (install-file "./README.rst"+ (string-append share "/doc/" ,name "-" ,version)))+ #t)))))+ (propagated-inputs+ `(("python-requests" ,python-requests)))+ (native-inputs+ `(("gzip" ,gzip)+ ("python-docutils" ,python-docutils)))+ (build-system python-build-system)+ (home-page "https://try.diffoscope.org")+ (synopsis "Client for remote diffoscope service")+ (description "This is a client for the @url{https://try.diffoscope.org,+remote diffoscope service}.++Diffoscope tries to get to the bottom of what makes files or directories+different. It recursively unpacks archives of many kinds and transforms+various binary formats into more human readable forms to compare them. It can+compare two tarballs, ISO images, or PDFs just as easily.++Results are displayed by default, stored as local text or html files, or made+available via a URL on @url{https://try.diffoscope.org}. Results stored on the+server are purged after 30 days.")+ (license license:gpl3+)))diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scmindex 18e8a3853f..965d129937 100644--- a/gnu/packages/package-management.scm+++ b/gnu/packages/package-management.scm@@ -10,7 +10,6 @@ ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org> ;;; Copyright © 2018, 2019 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>-;;; Copyright © 2019 Vagrant Cascadian <vagrant@reproducible-builds.org> ;;; Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de> ;;; ;;; This file is part of GNU Guix.@@ -31,7 +30,6 @@ (define-module (gnu packages package-management) #:use-module (gnu packages) #:use-module (gnu packages acl)- #:use-module (gnu packages admin) #:use-module (gnu packages attr) #:use-module (gnu packages avahi) #:use-module (gnu packages autotools)@@ -40,7 +38,6 @@ #:use-module (gnu packages bdw-gc) #:use-module (gnu packages bison) #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'- #:use-module (gnu packages cdrom) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages cpio)@@ -50,7 +47,6 @@ #:use-module (gnu packages docbook) #:use-module (gnu packages file) #:use-module (gnu packages gettext)- #:use-module (gnu packages ghostscript) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg)@@ -58,19 +54,12 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz)- #:use-module (gnu packages haskell)- #:use-module (gnu packages image)- #:use-module (gnu packages imagemagick)- #:use-module (gnu packages java) #:use-module (gnu packages linux) #:use-module (gnu packages lisp)- #:use-module (gnu packages llvm) #:use-module (gnu packages man)- #:use-module (gnu packages mono) #:use-module (gnu packages nettle) #:use-module (gnu packages nss) #:use-module (gnu packages patchutils)- #:use-module (gnu packages pdf) #:use-module (gnu packages perl) #:use-module (gnu packages perl-check) #:use-module (gnu packages pkg-config)@@ -82,10 +71,8 @@ #:use-module (gnu packages sqlite) #:use-module (gnu packages ssh) #:use-module (gnu packages texinfo)- #:use-module (gnu packages textutils) #:use-module (gnu packages time) #:use-module (gnu packages tls)- #:use-module (gnu packages video) #:use-module (gnu packages vim) #:use-module (gnu packages virtualization) #:use-module (gnu packages web)@@ -558,176 +545,6 @@ transactions from C or Python.") ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+. (license license:gpl2+))) -(define-public diffoscope- (let ((version "123"))- (package- (name "diffoscope")- (version version)- (source (origin- (method git-fetch)- (uri (git-reference- (url "https://salsa.debian.org/reproducible-builds/diffoscope.git")- (commit version)))- (file-name (git-file-name name version))- (sha256- (base32- "11bxms5rkhi0v4pxx29v4qgvhp3fmf0fkzci6gn5xcv4fl1zy4wj"))))- (build-system python-build-system)- (arguments- `(#:phases (modify-phases %standard-phases- ;; setup.py mistakenly requires python-magic from PyPi, even- ;; though the Python bindings of `file` are sufficient.- ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844- (add-after 'unpack 'dependency-on-python-magic- (lambda _- (substitute* "setup.py"- (("'python-magic',") ""))))- ;; This test is broken because our `file` package has a- ;; bug in berkeley-db file type detection.- (add-after 'unpack 'remove-berkeley-test- (lambda _- (delete-file "tests/comparators/test_berkeley_db.py")- #t))- ;; Test is dynamically generated and may have false- ;; negatives with different ocaml versions. Further- ;; background in: https://bugs.debian.org/939386- (add-after 'unpack 'remove-ocaml-test- (lambda _- (delete-file "tests/comparators/test_ocaml.py")- #t))- (add-after 'unpack 'embed-tool-references- (lambda* (#:key inputs #:allow-other-keys)- (substitute* "diffoscope/comparators/utils/compare.py"- (("\\['xxd',")- (string-append "['" (which "xxd") "',")))- (substitute* "diffoscope/comparators/elf.py"- (("@tool_required\\('readelf'\\)") "")- (("get_tool_name\\('readelf'\\)")- (string-append "'" (which "readelf") "'")))- (substitute* "diffoscope/comparators/directory.py"- (("@tool_required\\('stat'\\)") "")- (("@tool_required\\('getfacl'\\)") "")- (("\\['stat',")- (string-append "['" (which "stat") "',"))- (("\\['getfacl',")- (string-append "['" (which "getfacl") "',")))- #t))- (add-before 'check 'writable-test-data- (lambda _- ;; tests may need needs write access to tests- ;; directory- (for-each make-file-writable (find-files "tests"))- #t))- (add-before 'check 'delete-failing-test- (lambda _- ;; this requires /sbin to be on the path- (delete-file "tests/test_tools.py")- #t)))))- (inputs `(("rpm" ,rpm) ;for rpm-python- ("python-file" ,python-file)- ("python-debian" ,python-debian)- ("python-libarchive-c" ,python-libarchive-c)- ("python-tlsh" ,python-tlsh)- ("acl" ,acl) ;for getfacl- ("colordiff" ,colordiff)- ("xxd" ,xxd)))- ;; Below are modules used for tests.- (native-inputs `(("python-pytest" ,python-pytest)- ("python-chardet" ,python-chardet)- ;; test suite skips tests when tool is missing- ("bdb" ,bdb)- ("binutils" ,binutils)- ("bzip2" ,bzip2)- ("cdrtools" ,cdrtools)- ("colord" ,colord)- ("cpio" ,cpio)- ("docx2txt" ,docx2txt)- ("e2fsprogs" ,e2fsprogs)- ("ffmpeg" ,ffmpeg)- ("gettext" ,gettext-minimal)- ("ghc" ,ghc)- ("ghostscript" ,ghostscript)- ("giflib:bin" ,giflib "bin")- ("gnumeric" ,gnumeric)- ("gnupg" ,gnupg)- ("imagemagick" ,imagemagick)- ("libarchive" ,libarchive)- ("llvm" ,llvm)- ("lz4" ,lz4)- ("mono" ,mono)- ("odt2txt" ,odt2txt)- ;; no unversioned openjdk available- ("openjdk:jdk" ,openjdk12 "jdk")- ("openssh" ,openssh)- ("pgpdump" ,pgpdump)- ("poppler" ,poppler)- ("rpm" ,rpm)- ("sng" ,sng)- ("sqlite" ,sqlite)- ("squashfs-tools" ,squashfs-tools)- ("tcpdump" ,tcpdump)- ("unzip" ,unzip)- ("xxd" ,xxd)- ("xz" ,xz)- ("zip" ,(@ (gnu packages compression) zip))))- (home-page "https://diffoscope.org/")- (synopsis "Compare files, archives, and directories in depth")- (description- "Diffoscope tries to get to the bottom of what makes files or directories-different. It recursively unpacks archives of many kinds and transforms-various binary formats into more human readable forms to compare them. It can-compare two tarballs, ISO images, or PDFs just as easily.")- (license license:gpl3+))))--(define-public trydiffoscope- (package- (name "trydiffoscope")- (version "67.0.1")- (source- (origin- (method git-fetch)- (uri (git-reference- (url "https://salsa.debian.org/reproducible-builds/trydiffoscope.git")- (commit version)))- (file-name (git-file-name name version))- (sha256- (base32- "03b66cjii7l2yiwffj6ym6mycd5drx7prfp4j2550281pias6mjh"))))- (arguments- `(#:phases- (modify-phases %standard-phases- (add-after 'install 'install-doc- (lambda* (#:key outputs #:allow-other-keys)- (let* ((share (string-append (assoc-ref outputs "out") "/share/")))- (mkdir-p (string-append share "/man/man1/" ))- (invoke "rst2man.py"- "trydiffoscope.1.rst"- (string-append share "/man/man1/trydiffoscope.1"))- (mkdir-p (string-append share "/doc/" ,name "-" ,version))- (install-file "./README.rst"- (string-append share "/doc/" ,name "-" ,version)))- #t)))))- (propagated-inputs- `(("python-requests" ,python-requests)))- (native-inputs- `(("gzip" ,gzip)- ("python-docutils" ,python-docutils)))- (build-system python-build-system)- (home-page "https://try.diffoscope.org")- (synopsis "Client for remote diffoscope service")- (description "This is a client for the @url{https://try.diffoscope.org,-remote diffoscope service}.--Diffoscope tries to get to the bottom of what makes files or directories-different. It recursively unpacks archives of many kinds and transforms-various binary formats into more human readable forms to compare them. It can-compare two tarballs, ISO images, or PDFs just as easily.--Results are displayed by default, stored as local text or html files, or made-available via a URL on @url{https://try.diffoscope.org}. Results stored on the-server are purged after 30 days.")- (license license:gpl3+)))- (define-public python-anaconda-client (package (name "python-anaconda-client")-- 2.20.1
From c4ef8545514b4d594ab6fc083c954a22eace3786 Mon Sep 17 00:00:00 2001From: Vagrant Cascadian <vagrant@reproducible-builds.org>Date: Sun, 8 Sep 2019 15:35:33 -0700Subject: [PATCH 2/2] gnu: diffoscope: Add additional test dependencies.
* gnu/packages/diffoscope (diffoscope)[native-inputs]: Add abootimg, dtc, and r-minimal. (use-module): Add android, bootloaders and statistics, respectively.--- gnu/packages/diffoscope.scm | 6 ++++++ 1 file changed, 6 insertions(+)
Toggle diff (49 lines)diff --git a/gnu/packages/diffoscope.scm b/gnu/packages/diffoscope.scmindex 6eb5c1d9fe..828e06a818 100644--- a/gnu/packages/diffoscope.scm+++ b/gnu/packages/diffoscope.scm@@ -25,8 +25,10 @@ #:use-module (gnu packages) #:use-module (gnu packages acl) #:use-module (gnu packages admin)+ #:use-module (gnu packages android) #:use-module (gnu packages backup) #:use-module (gnu packages base)+ #:use-module (gnu packages bootloaders) #:use-module (gnu packages cdrom) #:use-module (gnu packages check) #:use-module (gnu packages compression)@@ -50,6 +52,7 @@ #:use-module (gnu packages python-xyz) #:use-module (gnu packages sqlite) #:use-module (gnu packages ssh)+ #:use-module (gnu packages statistics) #:use-module (gnu packages textutils) #:use-module (gnu packages video) #:use-module (gnu packages vim)@@ -137,6 +140,7 @@ (native-inputs `(("python-pytest" ,python-pytest) ("python-chardet" ,python-chardet) ;; test suite skips tests when tool is missing+ ("abootimg" ,abootimg) ("bdb" ,bdb) ("binutils" ,binutils) ("bzip2" ,bzip2)@@ -144,6 +148,7 @@ ("colord" ,colord) ("cpio" ,cpio) ("docx2txt" ,docx2txt)+ ("dtc" ,dtc) ("e2fsprogs" ,e2fsprogs) ("ffmpeg" ,ffmpeg) ("gettext" ,gettext-minimal)@@ -163,6 +168,7 @@ ("openssh" ,openssh) ("pgpdump" ,pgpdump) ("poppler" ,poppler)+ ("r-minimal" ,r-minimal) ("rpm" ,rpm) ("sng" ,sng) ("sqlite" ,sqlite)-- 2.20.1
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXXWQOAAKCRDcUY/If5cWquCCAQCWSRWA/yRO9MzMkYpl78tzViv9ou9ugb06aSnKD2Ec2AEA3Zfj208QJGcb0gj/xES0lSZgr31Z1lO1mn88NoeFlAM==U9Uj-----END PGP SIGNATURE-----
D
D
Danny Milosavljevic wrote on 11 Sep 2019 01:46
(name . Vagrant Cascadian)(address . vagrant@reproducible-builds.org)(address . 37346-done@debbugs.gnu.org)
20190911014625.529c1738@scratchpost.org
Hi Vagrant,
On Sun, 08 Sep 2019 16:35:19 -0700Vagrant Cascadian <vagrant@reproducible-builds.org> wrote:
Toggle quote (4 lines)> I was having infinite recursion issues importing additional modules such> as android.scm, bootloaders.scm and statistics.scm into> package-management.scm
Yeah, I hate import cycles.
I've pushed your patches to guix master.
Thanks!
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl14NdEACgkQ5xo1VCwwuqXBJAf7BvUmLQfTeiXkFv1uRUrtU9FfobcO96sJelbWlYYto/nEqzS1uvh8AUWxS/ZKkyYikSsVEBoFkR2Xwfw8ZiC/808AmvzBLgSXjc6iDnvCGbMdFJVshCtvu9AiaVIw7EmM6LnOWm2NJtITEhOlnUlXAtams4ThSHG8BEzSooD9RW/xlSjooKBstI4nONPKNZXLb6GsYTqkHpns3IRSlwpwRlSNetx+Wzjne/mv3A9BbcfdUHwP+yVSJTvQcrXl1mh9omcyzvBXQguQVvXp8x7y4EeAY+vsBwW3/JlKhtFmJw/Of1Z2UOH8RQNdlsbUL3fP5yYoV69sDO81ebCQBAW3Ow===qgW+-----END PGP SIGNATURE-----

Closed
L
L
Ludovic Courtès wrote on 11 Sep 2019 14:13
(name . Vagrant Cascadian)(address . vagrant@reproducible-builds.org)(address . 37346@debbugs.gnu.org)
87woefvxn1.fsf@gnu.org
Hello!
Vagrant Cascadian <vagrant@reproducible-builds.org> skribis:
Toggle quote (7 lines)> I was having infinite recursion issues importing additional modules such> as android.scm, bootloaders.scm and statistics.scm into> package-management.scm with use-modules calls, along these lines:>> error: googletest: unbound variable> hint: Did you forget a `use-modules' form?
Circular module dependencies alone shouldn’t cause these problems.Problems arise when those modules that depend on each other refer tovariables exported by one another *at the top level*.
That typically happens if, say, in android.scm you’d do:
(package (inherit diffoscope) …)
Toggle quote (8 lines)> Moving diffoscope to it's own package module seemed to at least work> around the issue. Diffoscope itself attempts to deal with an arbitrary> and growing number of file types, so pulls in quite a few other package> modules, so at least splitting it into a separate module might limit the> impacts on other modules.>> Attached are two patches attempting the split; comments welcome!
The split is a good idea anyhow!
Toggle quote (14 lines)> From 352058f2ef002e77df6633c00ba009088bf5e8bd Mon Sep 17 00:00:00 2001> From: Vagrant Cascadian <vagrant@reproducible-builds.org>> Date: Sun, 8 Sep 2019 14:36:33 -0700> Subject: [PATCH 1/2] gnu: Move diffoscope and trydiffoscope to new> diffoscope.scm.>> * gnu/packages/package-management (diffoscope): Remove variable.> (trydiffoscope): Remove variable.> (use-modules): Remove modules only needed by diffoscope.> Update copyright information.> * gnu/packages/diffoscope.scm: New file.> (diffoscope): Add variable.> (trydiffoscope): Add variable.
LGTM.
Toggle quote (9 lines)> From c4ef8545514b4d594ab6fc083c954a22eace3786 Mon Sep 17 00:00:00 2001> From: Vagrant Cascadian <vagrant@reproducible-builds.org>> Date: Sun, 8 Sep 2019 15:35:33 -0700> Subject: [PATCH 2/2] gnu: diffoscope: Add additional test dependencies.>> * gnu/packages/diffoscope (diffoscope)[native-inputs]: Add abootimg, dtc,> and r-minimal.> (use-module): Add android, bootloaders and statistics, respectively.
Note that we don’t usually mention ‘use-module’ changes in commit logs.
Anyway, LGTM, thanks!
Ludo’.
V
V
Vagrant Cascadian wrote on 18 Sep 2019 19:45
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 37346@debbugs.gnu.org)
87d0fxwlav.fsf@yucca
On 2019-09-11, Danny Milosavljevic wrote:
Toggle quote (11 lines)> On Sun, 08 Sep 2019 16:35:19 -0700> Vagrant Cascadian <vagrant@reproducible-builds.org> wrote:>>> I was having infinite recursion issues importing additional modules such>> as android.scm, bootloaders.scm and statistics.scm into>> package-management.scm>> Yeah, I hate import cycles.>> I've pushed your patches to guix master.
They don't seem to be in master as of commit:
cf48ea9539020bd6300033a8910ca951225582e6
I don't see any reverts, so curious what happened?

live well, vagrant
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXYJtKAAKCRDcUY/If5cWqg6FAQCBpXKrOlAs9Cq2DiYBLsgBSkwdiNzR+fxTW4/yx+wnkAD/d5LHdtkBiTS8BLpTayESWFfq95kyeP0TQ/JCP+sDDQ0==5ZUT-----END PGP SIGNATURE-----
V
V
Vagrant Cascadian wrote on 19 Sep 2019 02:30
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
874l19w2j8.fsf@yucca
On 2019-09-18, Vagrant Cascadian wrote:
Toggle quote (18 lines)> On 2019-09-11, Danny Milosavljevic wrote:>> On Sun, 08 Sep 2019 16:35:19 -0700>> Vagrant Cascadian <vagrant@reproducible-builds.org> wrote:>>>>> I was having infinite recursion issues importing additional modules such>>> as android.scm, bootloaders.scm and statistics.scm into>>> package-management.scm>>>> Yeah, I hate import cycles.>>>> I've pushed your patches to guix master.>> They don't seem to be in master as of commit:>> cf48ea9539020bd6300033a8910ca951225582e6>> I don't see any reverts, so curious what happened?
I went ahead and (re?)pushed it, dropping the use-modules bits based onludo's review.
live well, vagrant
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXYLMLAAKCRDcUY/If5cWquhQAPwJTRsjznxfzxDnQPt/yhq5uKKZKZvlF1yt1Hgcdyp7tQD/bOv/Un16pqA1QFRWRouGfNOOAK7QYZpsRRNw8TlccgY==onoa-----END PGP SIGNATURE-----
D
D
Danny Milosavljevic wrote on 19 Sep 2019 16:04
(name . Vagrant Cascadian)(address . vagrant@reproducible-builds.org)
20190919160404.62a8bbae@scratchpost.org
Hi Vagrant,
On Wed, 18 Sep 2019 17:30:35 -0700Vagrant Cascadian <vagrant@reproducible-builds.org> wrote:
Toggle quote (3 lines)> I went ahead and (re?)pushed it, dropping the use-modules bits based on> ludo's review.
Thanks. Not sure what happened, but I've checked it now, seems to be OK.
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl2DitQACgkQ5xo1VCwwuqVrZwf+NEoQXnDoWnwP2zWSbNWUjiQhqPwvTo3MzozRrVPdxArc+baI8Q+EkQaZUHKzsJEPnFCTuark32W7735K5r5LI8Fi6+UxriyKNjvs/RSQq73lF+74c0np2J24Nng7CZ8Y0cznPlAY/lmPq6TkMBoEFTvxYA595JFWxD5ACdDiLbUDeErZR0pLQaWep8O4RiSihhOrae3jM1iPaYxbag1ozakxQPZstxL+9tHBZCQ/xrnWfmf0zTdczkJ15QkhKpKkJQ8Q1Vjqp8hKaWHGGePOILisEL6MjTKtSFeH2P+lvpiz+9sA5h2DuicYQbhmWF6cHUYhiz0AVYqlvU2XuHxegg===ze+e-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

To comment on this conversation send email to 37346@debbugs.gnu.org