Commit 55d5f7ca authored by Ben Wagner's avatar Ben Wagner

Document what sysroot really does.

The previous documentation documented what the original patches for
sysroot did, which was to interpret all file paths as based on the
sysroot path. However, the actual implementation simply removes the
sysroot prefix if a path lexically begins with it. This leads to a
situation where an FcConfig may have a mix of sysroot and non-sysroot
paths. As a result, users should look for a file by first resolving
against the sysroot, but they should also look for the file without the
sysroot.
parent faa11fb6
Pipeline #29791 passed with stage
in 10 minutes and 40 seconds
...@@ -393,9 +393,10 @@ parse error, semantic error or allocation failure. Otherwise returns FcTrue. ...@@ -393,9 +393,10 @@ parse error, semantic error or allocation failure. Otherwise returns FcTrue.
@TYPE1@ const FcConfig * @ARG1@ config @TYPE1@ const FcConfig * @ARG1@ config
@PURPOSE@ Obtain the system root directory @PURPOSE@ Obtain the system root directory
@DESC@ @DESC@
Obtains the system root directory in 'config' if available. All files Obtains the system root directory in 'config' if available. When a file path
(including file properties in patterns) obtained from this 'config' are lexically begins with this string, this prefix will be removed when added to
relative to this system root directory. patterns. Files paths (including file properties in patterns) obtained from
this 'config' should be first searched for relative to this directory.
@SINCE@ 2.10.92 @SINCE@ 2.10.92
@@ @@
...@@ -405,13 +406,13 @@ relative to this system root directory. ...@@ -405,13 +406,13 @@ relative to this system root directory.
@TYPE2@ const FcChar8 * @ARG2@ sysroot @TYPE2@ const FcChar8 * @ARG2@ sysroot
@PURPOSE@ Set the system root directory @PURPOSE@ Set the system root directory
@DESC@ @DESC@
Set 'sysroot' as the system root directory. All file paths used or created with Set 'sysroot' as the system root directory. When a file path lexically begins
this 'config' (including file properties in patterns) will be considered or with the resulting FcConfigGetSysRoot string, this prefix will be removed when
made relative to this 'sysroot'. This allows a host to generate caches for added to patterns. This allows a host to generate caches for targets at build
targets at build time. This also allows a cache to be re-targeted to a time. This also allows a cache to be re-targeted to a different base directory
different base directory if 'FcConfigGetSysRoot' is used to resolve file paths. if 'FcConfigGetSysRoot' is used to resolve file paths. When setting this on the
When setting this on the current config this causes changing current config current config this causes changing the current config (calls
(calls FcConfigSetCurrent()). FcConfigSetCurrent()).
@SINCE@ 2.10.92 @SINCE@ 2.10.92
@@ @@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment