using KDE's config update support

Ralf Habacker ralf.habacker at freenet.de
Wed Apr 9 12:06:36 CEST 2008


Hi,

some time ago we discussed about build/install system postinstall 
scripting support. The current state is that the emerge buildsystem has 
such support for packages - the installer does not have this support 
implemented yet.

KDE by itself has an update mechanismus build around kconf_update and 
that means there is no need for an additional post install mechanismus 
in the installer itself. Detailled instructions could be found here: 
http://api.kde.org/4.x-api/kdelibs-apidocs/kconf_update/html/index.html

For a given package there are two files required - an kconf_update file 
and a script. An example is shown below:

------ <installroot>/share/apps/kconf_update/kdebase-runtime-4.0.68.upd 
-----
Id=kdebase-runtime-4.0.68
Options=overwrite
Script=kdebase-runtime-4.0.68-postinstall.cmd
---------------------------------------------------------------------------------

------ <installroot>/share/apps/kconf_update/kdebase-runtime-4.0.68.upd 
-----
@echo off

if not `"update-mime-database --help"` equ "" (
    update-mime-database %CD%\share\mime
) else (
    echo error: update-mime-database wasn't found.
    echo        please check for correct installation
)
---------------------------------------------------------------------------------

In the package source CMakeLists.txt there should be similiar to the 
following code to generate and install the required files.

----------------------- CMakeLists.txt ---------------------------------
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/kdebase-runtime.upd.cmake 
${CMAKE_CURRENT_BINARY_DIR}/kdebase-runtime.upd )

install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kdebase-runtime.upd 
DESTINATION ${KCONF_UPDATE_INSTALL_DIR} RENAME 
kdebase-runtime-${KDEVERSION}.upd)
install( FILES 
${CMAKE_CURRENT_SOURCE_DIR}/kdebase-runtime-postinstall.cmd DESTINATION 
${KCONF_UPDATE_INSTALL_DIR} RENAME 
kdebase-runtime-${KDEVERSION}-postinstall.cmd)

---------------------------------------------------------------------------------

I would patch the installer to add config update support by simply 
rerunning kdeinit4 (which runs kbuildsycoca and kconf_update, which in 
fact does the config update) after any installation. 

Any comments or objectivities ?

Ralf


More information about the Kde-windows mailing list