From 836297eae5ebe5fd0d434056db64770acc3f3275 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 27 Mar 2023 12:01:05 +0200 Subject: syscalls: 'getxattr' throws upon error. * guix/build/syscalls.scm (getxattr): Throw in the negative SIZE case. --- guix/build/syscalls.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'guix/build') diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index df9b9f6ac7..d947b010d3 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -970,7 +970,10 @@ backend device." (string->pointer key) (string->pointer "") 0))) - (cond ((< size 0) #f) + (cond ((< size 0) + (throw 'system-error "getxattr" "~S: ~A" + (list file key (strerror err)) + (list err))) ((zero? size) "") ;; Get VALUE in buffer of SIZE. XXX actual size can race. (else (let*-values (((buf) (make-bytevector size)) -- cgit v1.2.3 From e4ef2db8fda85a469a6fc89bf3c46c9d7e8d44ea Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 27 Mar 2023 15:07:03 -0400 Subject: build: qt-utils: Revert setting QT_PLUGIN_PATH exactly. Fixes . The documentation of Qt states that it is a supported use case to mix Qt 5 and Qt 6 plugins in QT_PLUGIN_PATH [0]. This reverts the change to QT_PLUGIN_PATH introduced in 1f466ed6be9 ("build: qt: Add qtbase argument and wrap Qt environment variables exactly."). [0] https://doc.qt.io/qt-6.2/deployment-plugins.html#loading-and-verifying-plugins-dynamically * guix/build/qt-utils.scm (variables-for-wrapping): Wrap QT_PLUGIN_PATH using the prefix method. --- guix/build/qt-utils.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'guix/build') diff --git a/guix/build/qt-utils.scm b/guix/build/qt-utils.scm index 2e47f1bc02..7f503320d2 100644 --- a/guix/build/qt-utils.scm +++ b/guix/build/qt-utils.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2021 Ludovic Courtès ;;; Copyright © 2021, 2022 Maxim Cournoyer +;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer ;;; Copyright © 2021 Brendan Tildesley ;;; ;;; This file is part of GNU Guix. @@ -87,9 +88,7 @@ "/applications" "/cursors" "/fonts" "/icons" "/glib-2.0/schemas" "/mime" "/sounds" "/themes" "/wallpapers") '("XDG_CONFIG_DIRS" suffix directory "/etc/xdg") - ;; We wrap exactly to avoid potentially mixing Qt5/Qt6 components, which - ;; would cause warnings, perhaps problems. - `("QT_PLUGIN_PATH" = directory + `("QT_PLUGIN_PATH" prefix directory ,(format #f "/lib/qt~a/plugins" qt-major-version)) `("QML2_IMPORT_PATH" = directory ,(format #f "/lib/qt~a/qml" qt-major-version)) -- cgit v1.2.3 From 83ee4dcf87943167e15efff29c59fd92a28668b7 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Sun, 2 Apr 2023 20:44:01 +0200 Subject: po: Do not auto-translate cross-references to other manuals. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported by Gottfried at . * guix/build/po.scm (xref-regexp): Dispatch on the number of arguments. Ensure there is no info-manual argument or it is empty. (translate-cross-references): Adapt to changed regexp. Signed-off-by: Ludovic Courtès --- guix/build/po.scm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'guix/build') diff --git a/guix/build/po.scm b/guix/build/po.scm index 7f88164cd8..62362e933e 100644 --- a/guix/build/po.scm +++ b/guix/build/po.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019, 2021 Julien Lepiller ;;; Copyright © 2020 Ludovic Courtès +;;; Copyright © 2023 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -123,7 +124,15 @@ and the value is the msgstr. The result only contains non fuzzy strings." (define xref-regexp ;; Texinfo cross-reference regexp. - (make-regexp "@(px|x)?ref\\{([^,}]+)")) + (make-regexp + (string-append "@(px|x)?ref\\{([^,}]+)(" + "\\}" ;Match xref with one argument + "|,[^,}]*\\}" ;or two arguments + "|,[^,}]*,[^,}]*\\}" ;or three arguments + ;; or with an *empty* fourth argument: + "|,[^,}]*,[^,}]*, *," + "|,[^,}]*,[^,}]*, *\\}" + ")"))) (define (translate-cross-references texi pofile) "Translate the cross-references that appear in @var{texi}, the initial @@ -157,13 +166,15 @@ translation of a Texinfo file, using the msgid/msgstr pairs from @var{pofile}." (cons (string-drop content offset) result))) ((head . tail) (let ((prefix (match:substring head 1)) - (ref (canonicalize-whitespace (match:substring head 2)))) + (ref (canonicalize-whitespace (match:substring head 2))) + (rest (match:substring head 3))) (define translated (string-append "@" (or prefix "") "ref{" (match (vhash-assoc ref translation-map) (#f ref) - ((_ . str) str)))) + ((_ . str) str)) + (or rest ""))) (loop tail (match:end head) -- cgit v1.2.3