| Summary: | kdesrc-run ignores options | ||
|---|---|---|---|
| Product: | [Developer tools] kdesrc-build | Reporter: | Juraj <jurajoravec> |
| Component: | general | Assignee: | Michael Pyne <mpyne> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | ashark |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
Cannot reproduce. `kdesrc-run --help` shows usage. `kdesrc-run -f kate -l 5 file1.txt` opens the file1.txt in kate (in the same instance, if that was already opened) at line 5. Note, that kate has a special code, that if forks even when you do not use the `-f` option. SOFTWARE/OS VERSIONS kdesrc-build 22.07 (v22.07-246-gceaed4b) [not a package from Arch repository] Thank you for looking into this. > Cannot reproduce. I did not specify that I am running this from ZSH shell. When it is called from BASH it runs just fine. It looks weird to me. > Note, that kate has a special code, that if forks even when you do not use the `-f` option. It can bug with just "kdesrc-run --help"; nothing else is needed, kate is innocent. No, working fine for me. I am also using zsh on Arch by the way.
```
➜ ~ echo $SHELL
/usr/bin/zsh
➜ kde6 ./kdesrc-run --help
Usage:
kdesrc-run [options] <module-name> [arguments]
Options:
-e, --exec <program> Specify program of the module. Default to module name.
-f, --fork Launch the program in a new session.
-q, --quiet Do not print run information.
-h, --help Print usage information and exit.
--list-installed Print installed modules and exit.
```
> When it is called from BASH it runs just fine.
Looks like you have a problem in your zsh.
Thank you for checking again. OK, I will try to find it or switch to bash.... Hello,
I found what is / was wrong.
The past me created an alias in .zshrc to make things easier for him and than forgot about it.
> ## Run projects built with kdesrc-build
> function kdesrc-run
> {
> source "$HOME/kde/build/$1/prefix.sh" && "$HOME/kde/usr/bin/$@"
> }
This is the cause of the problem, my forgotten configuration.
Thanks for sharing.
I have several folders: `~/kde5` and `~/kde6`. I have added `~/bin/kdesrc-run` with the following
```bash
#!/bin/bash
source /home/username/.config/kdesrc_kde_version # Contains VERSIONKDE=6
echo "Using kde version $VERSIONKDE"
cd /home/username/kde"$VERSIONKDE"
export QT_LOGGING_RULES="somecategory*=true;...";
export QT_MESSAGE_PATTERN="...%{message}";
./kdesrc-run $@
```
and similarly for the kdesrc-build. I can then easily switch between builds (for kde5 and kde6), while still be able to invoke kdesrc-build/run directly, without the need to go to corresponding folder or specifying the kdesrc-buildrc path.
TIL that there is an Arch package for kdesrc-build. Mentioned that in wiki.
|
SUMMARY The "kdesrc-run" script ignores provided options (-h, --help, -f, --fork, ...) and treats them as programs to start. STEPS TO REPRODUCE 1. Install kdesrc-build on Artix 2. run # kdesrc-run --help 3. or run an example # kdesrc-run -f kate -l 5 file1.txt OBSERVED RESULT An error message: > kdesrc-run:source:2: no such file or directory: /home/USER/kde/build/-f/prefix.sh > kdesrc-run:source:2: no such file or directory: /home/USER/kde/build/--help/prefix.sh > > General error message: > kdesrc-run:source:2: no such file or directory: /home/USER/kde/build/%OPTION%/prefix.sh Where %OPTION% is the provided option. EXPECTED RESULT The option is recognized and program (eg. kate) is started. SOFTWARE/OS VERSIONS Perl Version: 5.36.0-1 kdesrc-build Versions: 22.07-1 and git-r2635.630d70d-1 ADDITIONAL INFORMATION I tried both versions, one from Arch repositories (version 22.07-1) and also one built from AUR (git-r2635.630d70d-1) and both have same issue.