image_setup_paths – filter non-binary files in installed set of a package and remove ROOT basedir part from all paths.
Description
The method finds all non-binary files in D.
It recognizes them by types of file(1):
file -b --mime-type FILENAMEFiles are considered as non-binary, if their type from the command above is contained in any_root_exec_editable option. Additionally, header files, ending with .h, are skipped, as they don't contain paths inside.
Found files can be safely changed by text editors like sed(1).
All occurrences of ROOT
are removed from them.
If ROOT
is /build/context/amd64/hello-world-1.0,
file has contained some path /build/context/amd64/hello-world-1.0/usr/lib,
the resulting path in release file will be /usr/lib.
Edited path accords to target filesystem layout.
Writing
The method writes to D
and T.
Variables
Options
The following options affect the method:
- any_root_exec_editable