Replaces command-based initialization of the logging system with
an explicit backend parameter, simplifying configuration logic
and improving maintainability.
Removes redundant code that inferred the log backend from
command names. Updates all affected components to pass the
appropriate backend directly when initializing the log system.
Refactors the interaction with remote repositories to clarify the code's
intent.
Key changes include:
- Introduce `ClientAPIWrapper` to encapsulate the generated C-style API
client.
- The remote package searching function is renamed from `listRemote` to
`searchRemote` to better reflect its purpose.
- The `pull` method now requires an explicit repo argument.
- add `getPrioritySortedRepos` and `getPriorityGroupedRepos` helpers.
Co-authored-by: reddevillg <reddevillg@gmail.com>
Signed-off-by: reddevillg <reddevillg@gmail.com>
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
Introduces a new fmt based logging system to replace the previous
Qt-based logging mechanism.
Key features:
- Logging macros (LogD, LogI, LogW, LogE, LogF) for different levels.
- Configurable log levels and backends (Console, Journal).
- Configuration via environment variables (LINYAPS_LOG_LEVEL,
LINYAPS_LOG_BACKEND) for flexible control.
- Integration with systemd-journal for structured logging, including
code location (file, line, function).
- Custom `fmt` formatters for `QString`, `QStringList`, and
`linglong::utils::error::Error`.
- New string utility functions (`stringEqual`, `splitString`) are added.
The `qdebug_helper.h` is removed as part of this transition.
Signed-off-by: reddevillg <reddevillg@gmail.com>
1. provide application level patches
2. application level patches will apply after global patches
move configure.h.in to src root, becasue lib utils depends on QT,
we don't want to introduce QT in certain scenarios.
Signed-off-by: reddevillg <reddevillg@gmail.com>
Add the --alias option to set aliases for the 'll-cli repo add' and 'll-builder repo add' commands.
So update, remove, and set-default also need to pass alias instead of name.
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:
1. Update dbus interface xml files to
use QVariantMap as parameters and response;
2. Add api/schema/v1.yaml to generate all API types;
3. Remove qserializer.
Signed-off-by: black-desk <me@black-desk.cn>
systemBus() and sessionBus() is not return a reference but a value.
This value captured by address in a lambda cause crash when that value
is gone.
So we use a value capture here to fix it.
- introduce the new utils/global module for holding functions using
everywhere;
- add qt message handler for logging to journald;
- add -DQT_MESSAGELOGCONTEXT for enabling source location of log.
Signed-off-by: black-desk <me@black-desk.cn>