summary refs log tree commit diff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorJosselin Poiret <dev@jpoiret.xyz>2021-11-17 14:43:48 +0000
committerLudovic Courtès <ludo@gnu.org>2021-11-17 23:05:58 +0100
commit7c4142628a397f7863f346635591dbe92b667b45 (patch)
tree63fae672e4127f5010c4f9f4ecdd03c7c5d9c141 /gnu/system.scm
parent346d2f64889b0c82111e790e999bf6c754027e04 (diff)
downloadguix-7c4142628a397f7863f346635591dbe92b667b45.tar.gz
gnu: system: Improve location of some configuration warnings.
* gnu/bootloader.scm (%warn-target-field-deprecation): Remove it.
* gnu/bootloader.scm (warn-target-field-deprecation): Use
define-with-syntax-properties.
* gnu/system.scm (ensure-setuid-program-list): Ditto.  Also rename the
'location' variable to 'properties'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm11
1 files changed, 6 insertions, 5 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 17653682c5..73e6b58f2a 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1073,16 +1073,17 @@ use 'plain-file' instead~%")
     ;; TODO: Remove when glibc@2.23 is long gone.
     ("GUIX_LOCPATH" . "/run/current-system/locale")))
 
-(define-syntax-rule (ensure-setuid-program-list lst)
-  "Ensure LST is a list of <setuid-program> records and warn otherwise."
-  (%ensure-setuid-program-list lst (current-source-location)))
+;; Ensure LST is a list of <setuid-program> records and warn otherwise.
+(define-with-syntax-properties (ensure-setuid-program-list (lst properties))
+  (%ensure-setuid-program-list lst properties))
 
-(define (%ensure-setuid-program-list lst location)
+;; We want to be able to use defines, so define a procedure.
+(define (%ensure-setuid-program-list lst properties)
   (define warned? #f)
 
   (define (warn-once)
     (unless warned?
-      (warning (source-properties->location location)
+      (warning (source-properties->location properties)
                (G_ "representing setuid programs with file-like objects is \
 deprecated; use 'setuid-program' instead~%"))
       (set! warned? #t)))