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.
@TYPE1@ const FcConfig * @ARG1@ config
@PURPOSE@ Obtain the system root directory
@DESC@
Obtains the system root directory in 'config' if available. All files
(including file properties in patterns) obtained from this 'config' are
relative to this system root directory.
Obtains the system root directory in 'config' if available. When a file path
lexically begins with this string, this prefix will be removed when added to
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
@@
......@@ -405,13 +406,13 @@ relative to this system root directory.
@TYPE2@ const FcChar8 * @ARG2@ sysroot
@PURPOSE@ Set the system root directory
@DESC@
Set 'sysroot' as the system root directory. All file paths used or created with
this 'config' (including file properties in patterns) will be considered or
made relative to this 'sysroot'. This allows a host to generate caches for
targets at build time. This also allows a cache to be re-targeted to a
different base directory if 'FcConfigGetSysRoot' is used to resolve file paths.
When setting this on the current config this causes changing current config
(calls FcConfigSetCurrent()).
Set 'sysroot' as the system root directory. When a file path lexically begins
with the resulting FcConfigGetSysRoot string, this prefix will be removed when
added to patterns. This allows a host to generate caches for targets at build
time. This also allows a cache to be re-targeted to a different base directory
if 'FcConfigGetSysRoot' is used to resolve file paths. When setting this on the
current config this causes changing the current config (calls
FcConfigSetCurrent()).
@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