Commit Graph

107 Commits

Author SHA1 Message Date
reddevillg c6386bdfe5 feat: modify the way container patches work
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>
2025-06-04 14:45:07 +08:00
ice909 ca321628aa feat: add support for installing packages from specific repositories
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
2025-05-15 12:23:25 +08:00
ComixHe dbe988add5 style: format whole project
based on clang-format 19.1.7

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-05-14 11:35:50 +08:00
dengbo 8b2d49a6f1 refactor: adjust the default display type
The default display type is changed from app to all.
2025-05-12 10:27:23 +08:00
ice909 bb3624da8e feat: enhance package search with multi-repository support
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
2025-05-09 17:05:28 +08:00
ice909 fb09ada313 feat: optimization error message
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>
2025-04-16 10:56:11 +08:00
ice 5821e5c4ef
chore: update translate (#1114)
add ca、fi、pl、pt_BR、uk translates.
fix some typo.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-14 14:44:09 +08:00
dengbo11 4c66ed5a85 feat(cli): ll-cli add dir sub command
ll-cli add dir sub command to support get layer director by appid.
2025-03-04 09:59:10 +08:00
ComixHe d7cea3443a refactor: optimize starting container
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-27 19:42:27 +08:00
ice909 c8d3330c9c feat: add priority to the repo config
The default priority for the stable repository is 0.
When adding a new repository, its priority will be set to the current minimum priority minus 100.
If the new repository is set as the default repository, its priority will be set to the current maximum priority plus 100.
Added the set-priority subcommand to allow manual specification of priorities (duplicates are not allowed).
2025-02-25 14:23:22 +08:00
ice909 0283ea34f4 fix: ll-cli outputs --help info instead of --help-all
This commit ensures that `ll-cli` now outputs the standard `--help` information when no arguments are provided, aligning with common CLI conventions.
The `--help-all` option remains available for users who need expanded details.
2025-02-20 14:09:12 +08:00
ice909 fa51411213 feat: add translations for all titles
ll-cli list and search remove arch field.
2025-02-19 16:51:54 +08:00
ice909 1148261f8c fix: can't search after adding repo using alias
OSTree still uses defaultRepo, but defaultRepo has now become an alias.
2025-02-18 11:42:53 +08:00
ice909 ae7beb907f feat: filter search results to show only latest versions by default
Added a new `--all` flag to the search command to display all versions of packages.
By default, search results will only show the latest version of each package.
2025-02-13 20:56:31 +08:00
ice909 4b3fed1f00 feat: add --alias option for repo add
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.
2025-02-13 20:29:24 +08:00
ComixHe a233980823 feat: support kill container by specific signal
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-12 16:23:05 +08:00
ComixHe d393cf3ed5 fix: make option accepts empty container
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-07 18:14:50 +08:00
ComixHe bef4a49985 feat(ll-cli): add subcommand 'inspect'
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-20 05:41:29 +00:00
Comix 27ea143990
refactor: only create runtime directory before container running (#965)
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-16 16:12:01 +08:00
ComixHe e1c9652009 fix: Correcting file mappings when there is no file path passing
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-24 17:47:57 +08:00
myml 0b7d27fc0b fix: getRemoteModuleList for incompatibility with runtime modules
获取远程模块列表时, 应该考虑兼容旧版本的runtime modules
优化安装和升级流程, 只安装单个模块时, 不需要提前获取远程模块列表
2024-12-20 10:39:18 +08:00
ComixHe 851e178d3f refactor: move migrating process to ll-package-manager
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-26 14:27:39 +08:00
dengbo11 db54a5f645 fix(cli): ll-cli kill can not stop app by reference
1. Compatible with old versions to stop running app container using fuzz reference.
2. Only support enter running app container by fuzz reference.
2024-11-23 17:24:25 +08:00
dengbo11 e6aea9d998 feat(cli): support kill or enter container by appid
Support kill or enter application by appid.
2024-11-22 17:20:22 +08:00
ComixHe 57ea9cb404 feat: filepathMapping supports multiple files or urls
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-22 15:15:50 +08:00
ComixHe 7a45551fd9 refactor(migrate): try to migrate builder repo
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-21 17:34:58 +08:00
myml 4bea611f7b feat: re-export all application entries after migrate
在迁移后重新导出所有应用的entries, 避免数据残留影响功能
2024-11-21 16:55:36 +08:00
dengbo11 ce9545dd78 fix(ll-cli): cli sub command will error when use --json flag
Use fallthrough to allow list,search,info,content sub command to support --json flags.
2024-11-21 14:52:18 +08:00
dengbo11 124bc72721 fix(cli): add some options back for compatibility
--prune and --all options should be provided for compatibility with older command line parsing.

Bug: https://pms.uniontech.com/bug-view-288097.html
2024-11-20 17:16:00 +08:00
ComixHe ca4f8bc7c7 refactor: re-implement migrate
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-19 17:46:22 +08:00
kamiyadm c9d59d653d fix: adjust error output level
-

Log:
2024-11-14 17:17:33 +08:00
dengbo11 2d561fcab3 fix: subcommand help information display error
Subcommand should add usage, or will inherited the parent command.
2024-11-13 11:30:23 +08:00
dengbo11 dc2c18ee73 chore: code clear
Old command is not use, delete it.
2024-11-12 15:48:28 +08:00
dengbo11 71fe2c0e4b feat(cli): cli version support json format output
Cli version add json format output.
2024-11-12 15:48:28 +08:00
kamiyadm 06cd6d955e fix: cli returned if no avilable notifier
Fallback to DummyNotifier if no avilable notifier.

Log:
2024-11-11 17:07:59 +08:00
kamiyadm 7d848ab3a5 fix: some buildflag has uncertain value
Fully initialize those options.

Log:
2024-11-07 09:56:12 +08:00
dengbo11 f9ae16f25d feat(builder): linglong builder help information internationalization
Add ll-builder chinese, en_US, en_GB and spanish help information.
2024-11-06 18:16:45 +08:00
kamiyadm 97e0898bbf fix: can not do the migration
* If there need migrate and the current operation is
  not 'll-cli migrate', notify the message.
* Call runningAsRoot() before call migrate().

Log:
2024-11-06 10:43:11 +08:00
dengbo11 583ad9d024 feat(cli): linglong cli help information internationalization
Add ll-cli chinese and spanish help information.
2024-11-05 20:12:08 +08:00
kamiyadm c482eef998 fix(ll-cli): used a moved object
-

Log:
2024-11-05 20:10:10 +08:00
kamiyadm a769dbcb9b fix: build error because of wrong namespace
-

Log:
2024-11-05 16:05:40 +08:00
kamiyadm 21ce364aea fix: no permission to migrate
* Not doing interact before migration, only notification.
* Allow anyone to call WaitForAvailable() by dbus.

Log:
2024-11-05 15:33:04 +08:00
dengbo11 4ed4c07ec6 fix(cli): cli command output show abnormal
Do not use '\n' in command description, or it will show abnormal.
2024-11-04 13:39:27 +08:00
kamiyadm c056e3959a fix: auth_admin_keep is not worked
-

Log:
2024-11-01 17:37:54 +08:00
dengbo11 e8a17cd9c3 chore: misspelling of word
Word spelling inaccurate.
2024-11-01 10:56:18 +08:00
dengbo11 73d4db59e6 feat(cli): optimize cli command line parsing function
Use CLI11 to optimize cli command line parsing.
2024-11-01 10:56:18 +08:00
ComixHe ec4e2ecd44 feat: implement the 'deferred uninstallation' feature
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-10-31 13:35:32 +08:00
kamiyadm 715105aaa9 refactor(ll-cli): the initialization of notifier
Original behavior is use the DBusNotifier first if it can be initialized.
For now, if ll-cli is running in tty, we should use the terminalNotifier.

Log:
2024-10-31 13:35:32 +08:00
ComixHe 032627936c feat: add syncing mecanism between ll-cli and ll-package-manager
ll-package-manager will delay the uninstall process of application
if there are running containers that are using the application that
will be uninstalled and ll-package-manager may not daemonlize anymore
in the future.

So we need a mecanism to sync states and let ll-package-manager to know
how many running container there are and whether container is building
or not.

ll-cli should touch a file under /run/linglong/UID which named
with current pid and left empty to present initialization of ll-cli is
incomplete, ll-package-manager should waiting until all file are valid
(or exit immediately) if ll-package-manager want to uninstalling
package.

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-10-31 13:35:32 +08:00
kamiyadm 670e82dd76 refactor: change some api of ll-cli/ll-package-manager
* Change dbus return type to QVariantMap.
* Add new dbus method SetRunningState, Prune.
* Add new subcommand prune.
* Change the parameters in TaskChange.
* Add task for Uninstall.
* Set correct Status and SubStatus.

Log:
2024-10-31 13:35:32 +08:00