-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: adjust some cache generation and usage behaviors #888
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kamiyadm The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
49c0a4e
to
421dda3
Compare
4127698
to
bb66b31
Compare
The caches that have been processed are ld.so.cache and font cache. Code: * Add a new member ContainerBuilder to PackageManager. (package_manager) * Add a new scripts to gererate cache in container. (ld-cache-generator/font-cache-generator) * Add new func generateCache() to execute app-cache-generator. (pacakge_manager) * Add new func removeCache() to remove cache. (package_manager) * Mount the cache during running application. (cli) Mount:(host->container) * Remove /var/cache/fontconfig -> /var/cache/fontconfig * Add /usr/local/share/fonts -> /usr/local/share/fonts * Add /var/lib/linglong/cache/[hash] -> /run/linglong/cache * Add /var/lib/linglong/cache/[hash]/fontconfig -> /var/cache/fontconfig Config: (config.json) * Remove the hooks part. * Change env LINGLONG_LD_SO_CACHE to /run/linglong/cache/ld.so.cache. Log:
* In the build stage, create the cache directory in workdir and mount it to /run/linglong/cache. Then generate ld.so.cache in the hook. * In the run stage, mount the cache dirctory and generate both the ld.so.cache and font cache. Log:
61024e9
to
7a872f0
Compare
* Add dbus method GenerateCache, signal GenerateCacheFinished. (PM) * Add an exclusive write lock to the application cache in ensureCache to ensure that the container runs after the cache is generated. (cli) Log:
If LINGLONG_SKIP_HOME_GENERATE is set, don't mount the home dir of host. Log:
* If the XDG_DATA_DIRS is not set, the dir that used for storage container state will fallback to /run/ll-box. deepin-linglong has no permission to create dir in /run, so we should specific a writable path to ll-box. * Change Container::run(Process) to Container::run(Process, RunOption), we need to support specific run option. Log:
Signed-off-by: ComixHe <heyuming@deepin.org>
7a872f0
to
f375a7b
Compare
The caches that have been processed are ld.so.cache and font cache.
Code:
Mount:(host->container)
Config:
Log: