Skip to content

Add flag "--only-dependencies"

Qasim Khan requested to merge usereightthreeninefive/kde-builder:master into master

The purpose of this commit

This commit adds a flag "--only-dependencies", which tells kde-builder to only install the dependencies of the requested software. If kde-builder is run with the "--only-dependencies" and nothing else, it does not take effect.

How this works

In ksblib/Cmdline.py, a new argument is added to the list options_converted_to_canonical, "only-dependencies". When this argument is invoked, the only-dependencies key of the auxOptions dict is created and set to True. After that, when the _handle_build function is invoked, it checks whether the option only-dependencies is True, and if the user specified what software they are trying to build. If both conditions are met, the last element of the modules array (the software that the user specified) is removed, and only the dependencies are compiled and installed.

Why this commit

Some people (like me) probably want to install some KDE software without kde-builder. However, CMake complains that the required dependencies are not found. Rather than install each required dependency, kde-builder should automate this and install all the dependencies without installing the software.

Other things to note

To check if the user specified what software they want to build, TaskManager.py checks if the length of the modules to install is not 393, which is the number of modules to install if no software is specified. This can cause problems if new KDE software is introduced or removed and 393 turns into 394 or 392.

Merge request reports