Bug 386942

Summary: .py scripts in /usr/bin
Product: [Applications] skrooge Reporter: Jonathan Riddell <jr>
Component: generalAssignee: Stephane MANKOWSKI <stephane>
Status: RESOLVED FIXED    
Severity: normal CC: stephane
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: 25.1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jonathan Riddell 2017-11-15 11:37:00 UTC
Skrooge now installs two Python scripts in /usr/bin

skrooge-sabb.py
skrooge-yahoodl.py

This looks untidy and Debian's packaging tools complain about it.  Stuff in /usr/bin should be intended for users to run and users shouldn't care that they are Python.  Assuming they're not intended for users to run it would be better to put them in the application's data directory usr/share/skrooge/
Comment 1 Stephane MANKOWSKI 2017-11-15 17:12:30 UTC
Hi Jonathan,

You are right, these python scripts are installed in /usr/bin.

These scripts are run bin some plugins of Skrooge.
For test, I did the code to install them in /usr/share/skrooge.
I needed to update the $PATH when skrooge is started to add /usr/share/skrooge.

This work well but, if the user does a configuration error, the python script can fail and than Skrooge will return something like "skrooge-yahoodl.py ... failed".
The problem is that, if the user tries the command in a console to understand its error, he will have "command not found".

In conclusion:
I am able to do the expected correction.
But, this will be less user friendly for Skrooge users.

So, is it really mandatory to move these scripts from /usr/bin to /usr/share/skrooge ?

Regards.
Comment 2 Stephane MANKOWSKI 2017-11-26 15:20:32 UTC
Hi,

I found a better way. I will commit it.
Comment 3 Stephane MANKOWSKI 2017-11-26 15:22:03 UTC
Git commit 5e70aa7930dc166104c7a3ce7127e0583365462e by Stephane Mankowski.
Committed on 26/11/2017 at 15:21.
Pushed by smankowski into branch 'master'.

.py scripts in /usr/bin

M  +1    -0    CHANGELOG
M  +1    -1    plugins/import/skrooge_import_backend/CMakeLists.txt
M  +3    -0    plugins/import/skrooge_import_backend/skgimportpluginbackend.cpp
M  +1    -1    skgbankmodeler/CMakeLists.txt
M  +3    -0    skgbankmodeler/skgunitobject.cpp
M  +14   -0    skgbasemodeler/skgservices.cpp
M  +7    -0    skgbasemodeler/skgservices.h

https://commits.kde.org/skrooge/5e70aa7930dc166104c7a3ce7127e0583365462e