gexp: Remove #:deprecation-warnings from 'imported-files'.

This is a followup to 30d722c392.

* guix/gexp.scm (imported-files/derivation): Remove
 #:deprecation-warnings.  Pass "GUILE_WARN_DEPRECATED=no"
unconditionally to #:env-vars of 'gexp->derivation'.  Adjust caller.
(imported-files): Remove #:deprecation-warnings and adjust callers.
(imported-modules): Likewise.
(compiled-modules, gexp->derivation): Adjust accordingly.
This commit is contained in:
Ludovic Courtès 2018-07-27 00:09:52 +02:00
parent 4a42abc52c
commit 8afa18d6e7
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 10 additions and 32 deletions

View File

@ -697,9 +697,7 @@ The other arguments are as for 'derivation'."
(imported-modules %modules (imported-modules %modules
#:system system #:system system
#:module-path module-path #:module-path module-path
#:guile guile-for-build #:guile guile-for-build)
#:deprecation-warnings
deprecation-warnings)
(return #f))) (return #f)))
(compiled (if (pair? %modules) (compiled (if (pair? %modules)
(compiled-modules %modules (compiled-modules %modules
@ -1070,15 +1068,7 @@ to a tree suitable for 'interned-file-tree'."
#:key (name "file-import") #:key (name "file-import")
(symlink? #f) (symlink? #f)
(system (%current-system)) (system (%current-system))
(guile (%guile-for-build)) (guile (%guile-for-build)))
;; XXX: The only reason we have
;; #:deprecation-warnings is because (guix
;; build utils), which we use here, relies
;; on _IO*, which is deprecated in 2.2. On
;; the next full-rebuild cycle, we should
;; disable such warnings unconditionally.
(deprecation-warnings #f))
"Return a derivation that imports FILES into STORE. FILES must be a list "Return a derivation that imports FILES into STORE. FILES must be a list
of (FINAL-PATH . FILE) pairs. Each FILE is mapped to FINAL-PATH in the of (FINAL-PATH . FILE) pairs. Each FILE is mapped to FINAL-PATH in the
resulting store path. FILE can be either a file name, or a file-like object, resulting store path. FILE can be either a file name, or a file-like object,
@ -1118,24 +1108,17 @@ to the source files instead of copying them."
#:guile-for-build guile #:guile-for-build guile
#:local-build? #t #:local-build? #t
;; TODO: On the next rebuild cycle, set to "no" ;; Avoid deprecation warnings about the use of the _IO*
;; unconditionally. ;; constants in (guix build utils).
#:env-vars #:env-vars
(case deprecation-warnings '(("GUILE_WARN_DEPRECATED" . "no")))))
((#f)
'(("GUILE_WARN_DEPRECATED" . "no")))
((detailed)
'(("GUILE_WARN_DEPRECATED" . "detailed")))
(else
'())))))
(define* (imported-files files (define* (imported-files files
#:key (name "file-import") #:key (name "file-import")
;; The following parameters make sense when creating ;; The following parameters make sense when creating
;; an actual derivation. ;; an actual derivation.
(system (%current-system)) (system (%current-system))
(guile (%guile-for-build)) (guile (%guile-for-build)))
(deprecation-warnings #f))
"Import FILES into the store and return the resulting derivation or store "Import FILES into the store and return the resulting derivation or store
file name (a derivation is created if and only if some elements of FILES are file name (a derivation is created if and only if some elements of FILES are
file-like objects and not local file names.) FILES must be a list file-like objects and not local file names.) FILES must be a list
@ -1148,8 +1131,7 @@ as returned by 'local-file' for example."
files) files)
(imported-files/derivation files #:name name (imported-files/derivation files #:name name
#:symlink? derivation? #:symlink? derivation?
#:system system #:guile guile #:system system #:guile guile)
#:deprecation-warnings deprecation-warnings)
(interned-file-tree `(,name directory (interned-file-tree `(,name directory
,@(file-mapping->tree files))))) ,@(file-mapping->tree files)))))
@ -1157,8 +1139,7 @@ as returned by 'local-file' for example."
#:key (name "module-import") #:key (name "module-import")
(system (%current-system)) (system (%current-system))
(guile (%guile-for-build)) (guile (%guile-for-build))
(module-path %load-path) (module-path %load-path))
(deprecation-warnings #f))
"Return a derivation that contains the source files of MODULES, a list of "Return a derivation that contains the source files of MODULES, a list of
module names such as `(ice-9 q)'. All of MODULES must be either names of module names such as `(ice-9 q)'. All of MODULES must be either names of
modules to be found in the MODULE-PATH search path, or a module name followed modules to be found in the MODULE-PATH search path, or a module name followed
@ -1180,8 +1161,7 @@ last one is created from the given <scheme-file> object."
modules))) modules)))
(imported-files files #:name name (imported-files files #:name name
#:system system #:system system
#:guile guile #:guile guile)))
#:deprecation-warnings deprecation-warnings)))
(define* (compiled-modules modules (define* (compiled-modules modules
#:key (name "module-import-compiled") #:key (name "module-import-compiled")
@ -1199,9 +1179,7 @@ they can refer to each other."
#:system system #:system system
#:guile guile #:guile guile
#:module-path #:module-path
module-path module-path)))
#:deprecation-warnings
deprecation-warnings)))
(define build (define build
(gexp (gexp
(begin (begin