## Problem - https://bugzilla.suse.com/show_bug.cgi?id=1258187 - the `sle-ha` product is not installed after registering the SLES-HA extension - https://bugzilla.suse.com/show_bug.cgi?id=1259217 - no packages are available after registration ## Solution - Select the product from the just registered extension to install, select products from all registered extensions when changing the configuration via API - Refresh the repositories after registering a product ## Testing - Tested manually - The `sle-ha` product is found (as the repository is refreshed) and is selected to install: Log excerpt: ``` Selecting product sle-ha from repository SUSE_Linux_Enterprise_High_Availability_Extension_16.1_x86_64:SLE-Product-HA-16.1 [rust-bindings] Resetting status of all resolvables Selecting products from service SUSE_Linux_Enterprise_High_Availability_Extension_16.1_x86_64 Selecting product sle-ha from repository SUSE_Linux_Enterprise_High_Availability_Extension_16.1_x86_64:SLE-Product-HA-16.1 Install only required packages: false [zypp::solver] -------------- Calling SAT Solver ------------------- [zypp::solver] SATResolver::resolvePool() [zypp::solver] SATResolver::solverInit() [zypp::solver] Locked 0 installed items and 0 NOT installed items. [zypp::solver] Install U_Th_(7787)sle-ha-release-16.1-160099.11.1.x86_64(SUSE_Linux_Enterprise_High_Availability_Extension_16.1_x86_64:SLE-Product-HA-16.1) [zypp::solver] Install U_Th_(7790)product:sle-ha-16.1-0.x86_64(SUSE_Linux_Enterprise_High_Availability_Extension_16.1_x86_64:SLE-Product-HA-16.1) [zypp::solver] Install U_Th_(7835)NetworkManager-1.54.3-160099.1.1.x86_64(SUSE_Linux_Enterprise_Server_16.1_x86_64:SLE-Product-SLES-16.1) ``` |
||
|---|---|---|
| .. | ||
| include | ||
| internal | ||
| callbacks.cxx | ||
| lib.cxx | ||
| Makefile | ||
| README.md | ||
C-Layer on top of Libzypp
Goal of this part is to provide C API on top of libzypp. Goal is to have it as thin layer that allows to call easily libzypp functionality from languages that have issue to call C++ code (so almost all).
Directories
/includeis official public C API/internalis internal only C++ headers when parts of code need to communicate
Reminders
- if new header file is added to
/includeadd it also to../rust/zypp-agama-sys/headers.h
Coding Conventions
- All public methods are
noexcept. Instead it should getstatusparameter that is properly filled in both case if exception happen and also if call succeed. - If method progress can be observed, then use progress parameter. It can have two forms:
- just single method pointer and void* for data.
- one struct that contain multiple method pointers and for each pointer its void* data. Selection of variant depends on what libzypp provides. If libzypp use global progress Receiver, then it should be still parameter to method and it should be set at the beginning of method and unset at the end.
- if method provide any pointer, then memory is owned by caller who should deallocate it.
- if pointer provided by method is non-trivial ( usually struct ), then there have to be API call to free it.
- if method gets any pointer, it is still owned by caller who is responsible for its deallocation.
- if callback method receive any pointer, it is owned by library and library will deallocate it after callback finish.
- if a pointer is owned by the library (and should not be freed by the caller), it must be explicitly documented (e.g.
///< library owned). - ideally C layer should only have runtime dependency on libzypp and libstdc++