guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#65479] [PATCH core-updates v2 12/62] search-paths: Add $XML_CATALOG


From: Simon Tournier
Subject: [bug#65479] [PATCH core-updates v2 12/62] search-paths: Add $XML_CATALOG_FILES and $SGML_CATALOG_FILES.
Date: Mon, 25 Sep 2023 10:00:50 +0200

Hi,

A naive question. :-)

On Sat, 23 Sep 2023 at 15:19, Bruno Victal <mirai@makinata.eu> wrote:

> diff --git a/doc/guix.texi b/doc/guix.texi
> index 346af01e9d..5e7df75976 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -11132,17 +11132,14 @@ Search Paths
>  to be found in @file{xml} sub-directories---nothing less.  The search
>  path specification looks like this:
>  
> +@c This is defined at (guix search-paths) as $XML_CATALOG_FILES.
>  @lisp
> -(package
> -  (name "libxml2")
> -  ;; some fields omitted
> -  (native-search-paths
> -   (list (search-path-specification
> -          (variable "XML_CATALOG_FILES")
> -          (separator " ")
> -          (files '("xml"))
> -          (file-pattern "^catalog\\.xml$")
> -          (file-type 'regular)))))
> +(search-path-specification
> + (variable "XML_CATALOG_FILES")
> + (separator " ")
> + (files '("xml"))
> + (file-pattern "^catalog\\.xml$")
> + (file-type 'regular))
>  @end lisp

I do not see much the difference, except the ’package’ part.


[...]

> diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
> index 8b82c272fc..267a35e560 100644
> --- a/gnu/packages/perl.scm
> +++ b/gnu/packages/perl.scm
> @@ -601,12 +601,7 @@ (define-public perl-app-xml-docbook-builder
>       (list perl-class-xsaccessor perl-test-trap))
>      (native-search-paths
>       ;; xsltproc's search paths, to avoid propagating libxslt.
> -     (list (search-path-specification
> -            (variable "XML_CATALOG_FILES")
> -            (separator " ")
> -            (files '("xml"))
> -            (file-pattern "^catalog\\.xml$")
> -            (file-type 'regular))))
> +     (list $XML_CATALOG_FILES))

And here that’s not the new example from the manual.  Somehow, the way
using ’(search-path-specification (variable "XML_CATALOG_FILES") …)
seems documented but not (list $XML_CATALOG_FILES).  And that is
confusing me.


> diff --git a/guix/search-paths.scm b/guix/search-paths.scm
> index 8dc81861c9..752dc8099b 100644
> --- a/guix/search-paths.scm
> +++ b/guix/search-paths.scm
> @@ -38,6 +38,8 @@ (define-module (guix search-paths)
>              $SSL_CERT_DIR
>              $SSL_CERT_FILE
>              $TZDIR
> +            $SGML_CATALOG_FILES
> +            $XML_CATALOG_FILES

[...]

> +;; Some packages (notably libxml2) make use of 'XML_CATALOG_FILES'
> +;; and 'SGML_CATALOG_FILES' for remapping URI references or public/system
> +;; identifiers to other URI references.
> +(define $SGML_CATALOG_FILES
> +  ;; $SGML_CATALOG_FILES lists 'catalog' or 'CATALOG' or '*.cat' files found
> +  ;; under the 'sgml' sub-directory of any given package.
> +  (search-path-specification
> +   (variable "SGML_CATALOG_FILES")
> +   (separator ":")
> +   (files '("sgml"))
> +   (file-pattern "^catalog$|^CATALOG$|^.*\\.cat$")
> +   (file-type 'regular)))
> +
> +(define $XML_CATALOG_FILES
> +  ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
> +  ;; sub-directory of any given package.
> +  (search-path-specification
> +   (variable "XML_CATALOG_FILES")
> +   (separator " ")
> +   (files '("xml"))
> +   (file-pattern "^catalog\\.xml$")
> +   (file-type 'regular)))

Well, somehow the manual should provide an example using,

    (search-path-specification
     (variable "SOMETHING_RELEVANT")
     (separator " ")
     (files '("foo"))
     (file-pattern "^catalog\\.bar$")
     (file-type 'regular))

instead of the one using XML_CATALOG_FILES, especially if this former is
now replaced by the shorthand $XML_CATALOG_FILES.  Else, I am confused.

Cheers,
simon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]