| 1 |
# kf6-config Multi-Arch Notes |
| 2 |
|
| 3 |
## Previous state in Debian |
| 4 |
We used to ship libkf6config-bin with the following contents : |
| 5 |
/usr/bin/kreadconfig6 |
| 6 |
/usr/bin/kwriteconfig6 |
| 7 |
/usr/lib/${DEB_HOST_MULTIARCH}/libexec/kf6/kconf_update |
| 8 |
This prevented the libkf6config-bin package from being : |
| 9 |
- either Multi-Arch: same, not coinstallable due to the binaries in /usr/bin |
| 10 |
- or Multi-Arch: foreign, due to the kconfig-enabled application built against same arch libkf6configcore6 looking for kconf_update in that particular arch’s triplet location at runtime and failing if kconf_update is provided by a foreign architecture. (See #1103160’s initial description) |
| 11 |
|
| 12 |
## Analysis of the KF Config framework behaviour |
| 13 |
How kconf_update works : |
| 14 |
- kf config is a framework for applications to manage upgrades/migrations of their data between versions |
| 15 |
- it runs on application launch by the end-user when the application was built against the KF Config framework |
| 16 |
- the application will link to the libKF6ConfigCore library which will : |
| 17 |
- look for the kconf_update binary at KCONF_UPDATE_INSTALL_LOCATION (code in src/core/kconfig.cpp in KConfig::checkUpdate()) |
| 18 |
- which is set to "${KDE_INSTALL_FULL_LIBEXECDIR_KF}/$<TARGET_FILE_NAME:KF6::kconf_update>" (in src/core/CMakeLists.txt) |
| 19 |
- and run it when appropriate |
| 20 |
- kconf_update looks for update commands to be run that are shipped by that application above linking against libKF6ConfigCore : |
| 21 |
- either from /usr/share/kconf_update/ for arch-independent data listing scripts to run (.upd) or scripts themselves |
| 22 |
- or from /usr/lib/${ARCH}/kconf_update_bin/ for arch dependent binaries |
| 23 |
- analyzing the Debian archive using sources.debian.org showed no explicit use of the kconf_update binary outside of libkf6configcore6 code |
| 24 |
|
| 25 |
## Solution |
| 26 |
- Moving kconf_update from libkf6config-bin to libkf6configcore6 |
| 27 |
|
| 28 |
This will : |
| 29 |
- make kconf_update predictibly available when being used from inside libkf6configcore6 code. |
| 30 |
- make it possible to mark libkf6config-bin Multi-Arch: foreign since it now only contains binaries in /usr/bin |
| 31 |
- not impact packages depending on libkf6config-bin (only plasma-workspace at the time of the writing) because they were already not using the kconf_update binary directly |