Commit Graph

46 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 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
ComixHe e8b8a7037b fix: correct the logic of finding repo
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-18 11:01:57 +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
dengbo 5db9d54b40 fix: error to export applications entries directory
1. we must fix export entries when in no dbus mode;
2. we must copy application entries directorys to the root entries
   directorys before rewrite file;
2025-01-10 22:00:11 +08:00
myml 8e8bd7b0d7 feat: no need to export all entries on startup
不需要在每次启动package-manager时都执行一遍全量导出
2024-12-25 09:45:19 +08:00
kamiyadm 429bd1cc7c refactor: adjust some cache generation and usage behaviors
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:
2024-12-12 17:26:10 +08:00
dengbo11 cbe4bf2f57 fix(pm): migration not performed when update from old version
tryMigrate should performe before construction ostree repo.
2024-11-29 17:15:27 +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 e8a17cd9c3 chore: misspelling of word
Word spelling inaccurate.
2024-11-01 10:56:18 +08:00
ComixHe b203d63996 feat: support migrating data interactively
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-10-08 17:40:34 +08:00
ComixHe 6f7b243ec2 feat: add new dbus object for migrating underlying storage
Adding version '1' to dbus service 'org.deepin.linglong.PackageManager' and it's dbus object.

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-10-08 17:40:34 +08:00
myml c9d96bf627 fix: Using pointer to prevent object destruction
package manager应该使用指针类型的ClientFactory
避免对象在函数返回后被销毁

Log:
2024-06-18 14:57:34 +08:00
myml bf8489cfc9 feat: Create dedicated client for HTTP requests
使用单独的client发送http请求, 避免请求结果混淆

Log:
2024-06-14 09:42:52 +08:00
kamiyadm bc08c49339 fix: move ll-package-manager to /usr/libexec/linglong
close: https://github.com/linuxdeepin/linglong/issues/460

Log:
2024-05-27 16:48:48 +08:00
dengbo 32920bb32a fix: remove ll-system-helper when use --no-dbus option
remove ll-system-helper when use --no-dbus option

Log:
2024-05-10 16:10:16 +08:00
black-desk ee364e3007 refact: all API types use quicktype
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>
2024-04-01 17:05:32 +08:00
black-desk 3903d7cfef
fix: update PFL.cmake
Signed-off-by: black-desk <me@black-desk.cn>
2024-02-22 10:56:59 +08:00
black-desk 63950e8225
chore: add some log
Signed-off-by: black-desk <me@black-desk.cn>
2024-01-11 18:19:11 +08:00
black-desk 4d345a588c
fix: add service name for system helper
Signed-off-by: black-desk <me@black-desk.cn>
2024-01-11 18:19:10 +08:00
black-desk 67d5a74713
refact: add a check for p2p conn
Signed-off-by: black-desk <me@black-desk.cn>
2024-01-11 18:19:07 +08:00
black-desk e3a46e5e6b
fix: correct dbus address for p2p mode
Old location has permission issue.

Signed-off-by: black-desk <me@black-desk.cn>
2024-01-04 15:31:24 +08:00
black-desk 9d00026b28
refact: use new config
Signed-off-by: black-desk <me@black-desk.cn>
2023-12-26 10:19:38 +08:00
black-desk 28bb59c9fb fix: get right default repository
repos is not a QList but a QMap of QString.
2023-12-13 11:24:40 +08:00
black-desk 6fd9a4856b fix: use value captured dbus connection in main
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.
2023-12-13 11:24:34 +08:00
black-desk 5d71e0861f refact: inject repo::RepoClient
Signed-off-by: black-desk <me@black-desk.cn>
2023-11-29 11:35:35 +08:00
linxin f0ea664a1f
refact: refact repo module error handling
rewrite util::error by utils::error

Log: rewrite error handing
Signed-off-by: black-desk <me@black-desk.cn>
2023-11-24 09:54:14 +08:00
black-desk c834125382 fix: use Qt::QueuedConnection
Signed-off-by: black-desk <me@black-desk.cn>
2023-11-15 09:50:10 +08:00
black-desk 59a47b5ebd fix: register job manager
Signed-off-by: black-desk <me@black-desk.cn>
2023-11-15 09:50:10 +08:00
black-desk e9393e9e3b refact: remove pkg manager in ll-cli
use p2p dbus to call method from package_manager in ll-cli.
2023-11-13 01:01:23 +08:00
black-desk 45c88bb337 refact: use about to quit in main
`finally` runs after QCoreApplication::exec return.
2023-11-13 01:01:23 +08:00
black-desk f441040403 refact: refactory cli and its test
1. use pImpl for error;
2. remove factory template;
3. use gmock;
4. remove command helper class.
2023-11-13 01:01:23 +08:00
black-desk ee1dece0a3
style: run clang-format on all files
Signed-off-by: black-desk <me@black-desk.cn>
2023-10-13 22:41:07 +08:00
black-desk 9ada065677
build: refact build process
- update cmake-format config;
- using PFL.cmake (https://github.com/black-desk/PFL.cmake);
- using CPM.cmake (https://github.com/cpm-cmake/CPM.cmake).

Signed-off-by: black-desk <me@black-desk.cn>
2023-10-11 13:35:51 +08:00
black-desk a122049325
style: sort include
Signed-off-by: black-desk <me@black-desk.cn>
2023-10-07 10:55:46 +08:00
black-desk b07e3ea778
refact: remove private class of package mangaer
Signed-off-by: Chen Linxuan <me@black-desk.cn>
2023-09-28 14:03:13 +08:00
black-desk 6233e22990
refact: make ll-package-manager use utils/dbus
Signed-off-by: Chen Linxuan <me@black-desk.cn>
2023-09-28 14:03:10 +08:00
black-desk 2eee362db8
feat: use journald to logging
- 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>
2023-09-25 14:07:31 +08:00
black-desk 008d8b69d0
refact: move JobManager into linglong::job_manager
Signed-off-by: black-desk <me@black-desk.cn>
2023-08-15 13:52:12 +08:00
black-desk c9d82e32c9
build: mv job{_manager} adaptors to linglong/adaptors
Signed-off-by: black-desk <me@black-desk.cn>
2023-08-15 13:52:09 +08:00
black-desk 23be7f5f7d
build: mv package_manager adaptor to linglong/adaptors
Signed-off-by: black-desk <me@black-desk.cn>
2023-08-15 13:52:08 +08:00
black-desk e450e6b671
refact!: add version numbver to dbus interface
Signed-off-by: black-desk <me@black-desk.cn>
2023-08-15 13:52:02 +08:00
black-desk 4e67f8e3f3
build: add SPDX-* comments to CMakeLists.txt
Signed-off-by: black-desk <me@black-desk.cn>
2023-08-15 13:51:51 +08:00
black-desk dbd427f6ee
build: move module/* to src/linglong
Signed-off-by: black-desk <me@black-desk.cn>
2023-08-15 13:51:46 +08:00
black-desk 54f9648be1
build: move package_manager to src/linglong
Signed-off-by: black-desk <me@black-desk.cn>
2023-08-15 13:51:44 +08:00
black-desk 07bf9cc5be
build: move ll-package-manager to apps
Signed-off-by: black-desk <me@black-desk.cn>
2023-08-15 13:51:39 +08:00