1. Add new flag --no-clean-objects to remove command options
2. Modify cmdRemoveApp function signature to accept prune parameter
3. Conditionally execute repo.prune() based on prune flag
4. Maintain repo.mergeModules() execution regardless of prune flag
5. Update command line interface to expose the new flag
This change allows users to control whether object files should be
cleaned during app removal. By default, objects are cleaned (previous
behavior), but users can now skip this step using --no-clean-objects
flag for faster removal operations or when they want to preserve objects
for other purposes.
Log: Added --no-clean-objects flag to ll-builder remove command
Influence:
1. Test default remove behavior (should clean objects)
2. Test remove with --no-clean-objects flag (should not clean objects)
3. Verify repo.mergeModules() is always called
4. Test removal of single and multiple apps with both options
5. Verify error handling for invalid app references
6. Test edge cases with empty app list
feat: 为 remove 命令添加 no-clean-objects 选项
1. 为 remove 命令选项添加新的 --no-clean-objects 标志
2. 修改 cmdRemoveApp 函数签名以接受 prune 参数
3. 根据 prune 标志有条件地执行 repo.prune()
4. 无论 prune 标志如何都执行 repo.mergeModules()
5. 更新命令行界面以暴露新标志
此更改允许用户控制在删除应用程序期间是否应清理对象文件。默认情况下,对象
会被清理(之前的行为),但用户现在可以使用 --no-clean-objects 标志跳过此
步骤,以实现更快的删除操作或在他们希望为其他目的保留对象时使用。
Log: 为 ll-builder remove 命令添加 --no-clean-objects 标志
Influence:
1. 测试默认删除行为(应清理对象)
2. 测试使用 --no-clean-objects 标志的删除(不应清理对象)
3. 验证 repo.mergeModules() 是否始终被调用
4. 测试单个和多个应用程序的删除(两种选项)
5. 验证无效应用程序引用的错误处理
6. 测试空应用程序列表的边界情况
The logic for handling the `--no-dbus` flag was inverted. It was
checking `!noDBusFlag` which meant the sudo block was executed when
`--no-dbus` was *not* set. This meant that the application attempted
to use the package manager connection even when the user explicitly
requested to not use dbus (and likely intended to run as root). This
commit corrects the logic by checking `*noDBusFlag`. Now the sudo block
will only execute when `--no-dbus` is actually set.
Influence:
1. Test ll-cli commands with and without the `--no-dbus` flag as a
normal user. Verify that without `--no-dbus`, the commands fail due to
insufficient permissions.
2. Test ll-cli commands with the `--no-dbus` flag as root. Verify that
the commands succeed.
3. Test ll-cli commands without the `--no-dbus` flag as root. Verify
that the commands succeed as they will connect via DBus.
fix: 修正 no-dbus 标志逻辑
`--no-dbus` 标志的处理逻辑被反转了。 它检查的是 `!noDBusFlag`,这意味着
当 *没有* 设置 `--no-dbus` 时,sudo 代码块会被执行。 这意味着即使当用户
明确要求不使用 dbus (并且可能打算以 root 身份运行) 时,应用程序也会尝试
使用包管理器连接。 此提交通过检查 `*noDBusFlag` 来更正逻辑。 现在,只有
在实际设置 `--no-dbus` 时,sudo 代码块才会执行。
Influence:
1. 作为普通用户,使用和不使用 `--no-dbus` 标志测试 ll-cli 命令。 验证在
没有 `--no-dbus` 的情况下,由于权限不足,命令会失败。
2. 作为 root 用户,使用 `--no-dbus` 标志测试 ll-cli 命令。 验证命令是否
成功。
3. 作为 root 用户,在没有 `--no-dbus` 标志的情况下测试 ll-cli 命令。 验
证命令是否成功,因为它们将通过 DBus 连接。
1. Fixed inverted logic in list command for showing upgrade list vs
regular package list
2. Added sorting by package ID for both regular list and upgrade list
outputs
3. Replaced Qt logging with linglong's custom logging in ostree
repository
4. Maintained existing filtering functionality by package type
Log: Fixed package list display logic and improved sorting
Influence:
1. Test ll-cli list command without parameters to show installed
packages
2. Test ll-cli list --upgradable to show available upgrades
3. Verify package sorting by ID in both list modes
4. Test package type filtering with --type parameter
5. Verify installation time display in package list
6. Confirm error handling for repository access issues
fix: 修复列表命令逻辑和日志记录
1. 修复了显示升级列表与常规包列表的反向逻辑
2. 为常规列表和升级列表输出添加了按包ID排序功能
3. 在ostree仓库中将Qt日志替换为linglong自定义日志
4. 保持了按包类型过滤的现有功能
Log: 修复包列表显示逻辑并改进排序功能
Influence:
1. 测试不带参数的 ll-cli list 命令以显示已安装的包
2. 测试 ll-cli list --upgradable 以显示可用升级
3. 验证两种列表模式下的包ID排序
4. 测试使用 --type 参数的包类型过滤功能
5. 验证包列表中的安装时间显示
6. 确认仓库访问错误的处理机制
1. Add `--base` option to specify the base layer.
2. Add `--runtime` option to specify the runtime.
3. Modify `RunContext::resolve` to utilize the `--base` and `--runtime`
options.
4. Update builder resolution to pass base and runtime references.
5. Add logging for base and runtime resolution
Log: Added command-line options to specify the base and runtime for
application execution.
Influence:
1. Test application execution with different base layers.
2. Verify that specifying a runtime overrides the default runtime.
3. Ensure that the `--base` and `--runtime` options are respected during
application resolution.
4. Check that the logging accurately reflects the used base and runtime.
feat: 为 ll-cli 添加 base 和 runtime 选项
1. 添加 --base 选项来指定基础层
2. 添加 --runtime 选项来指定运行时环境
3. 修改 RunContext::resolve 以使用 --base 和 --runtime 选项
4. 更新构建器解析以传递基础和运行时引用
5. 添加基础和运行时解析的日志记录
Log: 增加了 ll-cli 的命令行选项,用于指定应用程序执行的基础层和运行时
环境。
Influence:
1. 使用不同的基础层测试应用程序执行
2. 验证指定运行时是否会覆盖默认运行时
3. 确保在应用程序解析期间尊重 --base 和 --runtime 选项
4. 检查日志是否准确地反映所使用的基础和运行时
- Only forward signals from non-kernel sources in handle_sigevent
- Handle EINTR in epoll_wait loop to avoid premature exit on signal interruption
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
- Add processProfile function for triplet configuration
- Fix mount options from rbind to bind
- Optimize custom loader handling in packager
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
Add ability to export specific package references from repository using
--ref and --modules parameters, without requiring complete project setup.
This mode is only for distributing.
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>
Adding a '--env' option to the ll-cli run command,
allowing users to set environment variables when running applications.
This feature supports multiple environment variables in KEY=VALUE format with
input validation to ensure proper formatting.
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
The init process will now exit with the same code as the initial child
process it manages. This is crucial for environments like the builder,
where the success or failure of a command must be detected.
Add missing LINYAPS_INIT_SINGLE_MODE in handling process build depends.
Signed-off-by: reddevillg <reddevillg@gmail.com>
Adds support for specifying a module when using the `ll-cli dir`
command. This allows users to retrieve the layer directory for a
specific module within an application.
1. Added new CLI commands `enable-mirror` and `disable-mirror` for
repository management
2. Implemented handler functions for mirror enable/disable operations in
both ll-builder and ll-cli
3. Modified repo config handling to support mirrorEnabled flag as
optional boolean
4. Updated test cases to include mirrorEnabled field in test data
5. Improved repo alias handling by using value_or to fallback to
repoName when alias is not provided
These changes allow users to control mirror functionality for
repositories through CLI commands, providing more flexibility in
repository configuration. The mirrorEnabled flag is now properly handled
in the OSTree repo configuration.
feat: 为仓库添加镜像启用/禁用功能
1. 新增了用于仓库管理的`enable-mirror`和`disable-mirror` CLI命令
2. 在ll-builder和ll-cli中实现了镜像启用/禁用操作的处理函数
3. 修改了仓库配置处理以支持可选的mirrorEnabled标志
4. 更新了测试用例,在测试数据中包含mirrorEnabled字段
5. 通过使用value_or在别名未提供时回退到repoName,改进了仓库别名处理
这些变更允许用户通过CLI命令控制仓库的镜像功能,为仓库配置提供更多灵活
性。现在在OSTree仓库配置中正确处理了mirrorEnabled标志。
- Add content-based validation for ld.so.conf to detect layer path
changes
- Include configuration sources hash in ld.so.conf for validation
- In PackageManager GenerateCache always generate cache,
tryGenerateCache will skip it if cache directory exists
- use memcpy in sha256 to avoid unaligned visit
This ensures that ld.so.cache is properly regenerated when the
underlying layer configuration changes, preventing stale cache issues.
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>
1. ll-builder use current directory as project directory.
2. Project yaml file(aka linglong.yaml) must reside within project
directory or its subdirectories.
3. User can use -f option to specfy a project yaml file.
4. ll-builder will attempt to load project yaml file in the following
order from the project root directory:
- linglong.<arch>.yaml (architecture-specific)
- linglong.yaml (generic)
Signed-off-by: reddevillg <reddevillg@gmail.com>
1. Added a new --repo option to the install command to specify a
repository for installation
2. Enhanced repository management with priority-based package resolution
3. Implemented methods to get, promote and recover repository priorities
4. Updated package installation logic to respect repository selection
5. Improved error handling for module not found cases
6. Added ReferenceWithRepo struct to track package references with their
source repositories
1. Added repository field to search parameters requiring specifying
repos to search
2. Modified search implementation to support searching in multiple
repositories
3. Restructured search results to group packages by repository source
4. Added --repo option to the CLI search command
5. Updated display format to show repository information in search
results
6. Improved filtering logic to work with the repository-grouped package
structure
7. Added PackageManager1PruneResult type to separate it from search
results
The code now parses base and runtime fields using FuzzyReference::parse
before validating their versions, adding proper error handling for
parsing failures. This ensures that complex reference formats are
correctly handled before version validation is performed, making
the validation process more robust.
When writing a version number incorrectly, it should return an error and exit instead of crashing directly.
Signed-off-by: ice909 <gaochang1@uniontech.com>
Define error codes to identify different errors.
The cli displays error information to users based on error codes.
Add -v,--verbose option to display detailed error information.
Signed-off-by: ice909 <gaochang1@uniontech.com>
project source: https://github.com/Yelp/dumb-init
We need an init process to forwarding signal and cleaning orphaned zombie processes.
In above cases, it is more convenent that replacing bash with dumb-init
Signed-off-by: ComixHe <heyuming@deepin.org>