From 6cbee49d6668eb7fd738080666f66febfce8c7e8 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 16 Mar 2018 07:47:34 -0400 Subject: gnu: All snippets report errors using exceptions, else return #t. * gnu/packages/admin.scm, gnu/packages/algebra.scm, gnu/packages/audio.scm, gnu/packages/backup.scm, gnu/packages/base.scm, gnu/packages/bioinformatics.scm, gnu/packages/cdrom.scm, gnu/packages/chez.scm, gnu/packages/code.scm, gnu/packages/compression.scm, gnu/packages/cross-base.scm, gnu/packages/crypto.scm, gnu/packages/cups.scm, gnu/packages/databases.scm, gnu/packages/dns.scm, gnu/packages/emacs.scm, gnu/packages/emulators.scm, gnu/packages/engineering.scm, gnu/packages/enlightenment.scm, gnu/packages/fpga.scm, gnu/packages/freedesktop.scm, gnu/packages/ftp.scm, gnu/packages/games.scm, gnu/packages/gcc.scm, gnu/packages/geo.scm, gnu/packages/ghostscript.scm, gnu/packages/gl.scm, gnu/packages/glib.scm, gnu/packages/gnome.scm, gnu/packages/gnuzilla.scm, gnu/packages/graphics.scm, gnu/packages/gtk.scm, gnu/packages/guile.scm, gnu/packages/irc.scm, gnu/packages/java.scm, gnu/packages/kerberos.scm, gnu/packages/linux.scm, gnu/packages/lisp.scm, gnu/packages/lxde.scm, gnu/packages/machine-learning.scm, gnu/packages/mail.scm, gnu/packages/maths.scm, gnu/packages/messaging.scm, gnu/packages/monitoring.scm, gnu/packages/mp3.scm, gnu/packages/music.scm, gnu/packages/netpbm.scm, gnu/packages/networking.scm, gnu/packages/node.scm, gnu/packages/nvi.scm, gnu/packages/ocaml.scm, gnu/packages/pdf.scm, gnu/packages/perl.scm, gnu/packages/php.scm, gnu/packages/plotutils.scm, gnu/packages/pretty-print.scm, gnu/packages/profiling.scm, gnu/packages/pulseaudio.scm, gnu/packages/python-crypto.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/robotics.scm, gnu/packages/sawfish.scm, gnu/packages/scanner.scm, gnu/packages/scheme.scm, gnu/packages/scribus.scm, gnu/packages/sdl.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/slang.scm, gnu/packages/smalltalk.scm, gnu/packages/ssh.scm, gnu/packages/sync.scm, gnu/packages/syncthing.scm, gnu/packages/tbb.scm, gnu/packages/terminals.scm, gnu/packages/texinfo.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/tls.scm, gnu/packages/unrtf.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vpn.scm, gnu/packages/web.scm, gnu/packages/wm.scm, gnu/packages/wxwidgets.scm, gnu/packages/xdisorg.scm, gnu/packages/xorg.scm: In all snippets, report errors using exceptions, or else return #t. --- gnu/packages/linux.scm | 75 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 30 deletions(-) (limited to 'gnu/packages/linux.scm') diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 40f172c654..8875e5d28f 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1687,16 +1687,19 @@ (define fuse-static (source (origin (inherit (package-source fuse)) (modules '((guix build utils))) (snippet - ;; Normally libfuse invokes mount(8) so that /etc/mtab is - ;; updated. Change calls to 'mtab_needs_update' to 0 so that - ;; it doesn't do that, allowing us to remove the dependency on - ;; util-linux (something that is useful in initrds.) - '(substitute* '("lib/mount_util.c" - "util/mount_util.c") - (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)") - "0") - (("/bin/") - ""))))))) + '(begin + ;; Normally libfuse invokes mount(8) so that /etc/mtab is + ;; updated. Change calls to 'mtab_needs_update' to 0 so + ;; that it doesn't do that, allowing us to remove the + ;; dependency on util-linux (something that is useful in + ;; initrds.) + (substitute* '("lib/mount_util.c" + "util/mount_util.c") + (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)") + "0") + (("/bin/") + "")) + #t)))))) (define-public unionfs-fuse/static (package (inherit unionfs-fuse) @@ -1705,11 +1708,13 @@ (define-public unionfs-fuse/static (source (origin (inherit (package-source unionfs-fuse)) (modules '((guix build utils))) (snippet - ;; Add -ldl to the libraries, because libfuse.a needs that. - '(substitute* "src/CMakeLists.txt" - (("target_link_libraries(.*)\\)" _ libs) - (string-append "target_link_libraries" - libs " dl)")))))) + '(begin + ;; Add -ldl to the libraries, because libfuse.a needs that. + (substitute* "src/CMakeLists.txt" + (("target_link_libraries(.*)\\)" _ libs) + (string-append "target_link_libraries" + libs " dl)"))) + #t)))) (arguments '(#:tests? #f #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static") @@ -1871,7 +1876,8 @@ (define-public kbd (substitute* '("src/unicode_start" "src/unicode_stop") ;; Assume the Coreutils are in $PATH. (("/usr/bin/tty") - "tty")))))) + "tty")) + #t)))) (build-system gnu-build-system) (arguments '(#:phases @@ -2063,7 +2069,8 @@ (define-public lvm2 (("confdir = .*$") "confdir = @sysconfdir@\n") (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@") - "DEFAULT_SYS_DIR = @sysconfdir@")))) + "DEFAULT_SYS_DIR = @sysconfdir@")) + #t)) (patches (search-patches "lvm2-static-link.patch")))) (build-system gnu-build-system) (native-inputs @@ -2247,7 +2254,9 @@ (define-public wireless-regdb "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip")) ;; We're building 'regulatory.bin' by ourselves. - (snippet '(delete-file "regulatory.bin")))) + (snippet '(begin + (delete-file "regulatory.bin") + #t)))) (build-system gnu-build-system) (arguments '(#:phases (modify-phases %standard-phases @@ -2680,7 +2689,8 @@ (define-public sysfsutils-1 "includedir = @includedir@")) (substitute* "configure" (("includedir='(\\$\\{prefix\\}/include)'" all orig) - (string-append "includedir='" orig "/sysfs'"))))))) + (string-append "includedir='" orig "/sysfs'"))) + #t)))) (synopsis "System utilities based on Linux sysfs (version 1.x)"))) (define-public cpufrequtils @@ -3295,9 +3305,10 @@ (define-public thinkfan (modules '((guix build utils))) ;; Fix erroneous man page location in Makefile leading to ;; a compilation failure. - (snippet - '(substitute* "CMakeLists.txt" - (("thinkfan\\.1") "src/thinkfan.1"))))) + (snippet '(begin + (substitute* "CMakeLists.txt" + (("thinkfan\\.1") "src/thinkfan.1")) + #t)))) (build-system cmake-build-system) (arguments `(#:modules ((guix build cmake-build-system) @@ -3348,11 +3359,12 @@ (define-public ntfs-3g (base32 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy")) (modules '((guix build utils))) - (snippet - ;; Install under $prefix. - '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in") - (("/sbin") - "@sbindir@"))))) + (snippet '(begin + ;; Install under $prefix. + (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in") + (("/sbin") + "@sbindir@")) + #t)))) (build-system gnu-build-system) (inputs `(("util-linux" ,util-linux) ("fuse" ,fuse))) ;libuuid @@ -3648,9 +3660,12 @@ (define-public mcelog (file-name (string-append name "-" version ".tar.gz")) (modules '((guix build utils))) (snippet - ;; The snapshots lack a .git directory, breaking ‘git describe’. - `(substitute* "Makefile" - (("\"unknown\"") (string-append "\"v" ,version "\"")))))) + `(begin + ;; The snapshots lack a .git directory, + ;; breaking ‘git describe’. + (substitute* "Makefile" + (("\"unknown\"") (string-append "\"v" ,version "\""))) + #t)))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases -- cgit v1.2.3