Description of problem: When pysdm is called from a shell, the default PATH finds it as /bin/pysdm (with F18 /bin being a symlink to /usr/bin) and the dirname logic in the script tries to find the python code in /share/pysdm instead of /usr/share/pysdm. $ sudo pysdm /bin/pysdm: line 5: cd: //share/pysdm: No such file or directory python: can't open file 'pysdm.py': [Errno 2] No such file or directory $ sudo sh -x pysdm ++ dirname pysdm + path=. ++ dirname . + path=. + cd ./share/pysdm /bin/pysdm: line 5: cd: ./share/pysdm: No such file or directory + python pysdm.py python: can't open file 'pysdm.py': [Errno 2] No such file or directory $ sudo sh -x /bin/pysdm ++ dirname /bin/pysdm + path=/bin ++ dirname /bin + path=/ + cd //share/pysdm /bin/pysdm: line 5: cd: //share/pysdm: No such file or directory + python pysdm.py python: can't open file 'pysdm.py': [Errno 2] No such file or directory Only when you actually run it as /usr/bin/pysdm does it work: $ sudo sh -x /usr/bin/pysdm ++ dirname /usr/bin/pysdm + path=/usr/bin ++ dirname /usr/bin + path=/usr + cd /usr/share/pysdm + python pysdm.py Perhaps the upstream package does this dirname dance to accomodate weird distro layouts, but there's no reason for us in Fedora to do this. We should just cd into the right directory and call it. Version-Release number of selected component (if applicable): pysdm-0.4.1-4.fc18.noarch How reproducible: 100%. Just call it on a shell and it will fail, unless you use the full path to the executable script.
Whoops, looks like i fixed this and did builds but never submitted a bodhi update. Working on it now.
pysdm-0.4.1-7.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/pysdm-0.4.1-7.fc18
pysdm-0.4.1-7.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/pysdm-0.4.1-7.fc19
Package pysdm-0.4.1-7.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing pysdm-0.4.1-7.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-20040/pysdm-0.4.1-7.fc18 then log in and leave karma (feedback).
Verified that pysdm-0.4.1-7.fc18.noarch works fine regardless of how it is called. Tried these: $ sudo pysdm $ sudo /bin/pysdm $ sudo /usr/bin/pysdm They all work equally well. Thank you! For a future update, you might as well completely remove the "path=" lines, as they serve absolutely no purpose in the script: $ cat -n /usr/bin/pysdm 1 #!/bin/sh 2 3 path=`dirname $0` 4 path=`dirname /usr` 5 cd /usr/share/pysdm 6 python pysdm.py Remove lines 3 and 4. "path" is not an exported variable in that script, so they will not affect how pysdm runs in any way. :) Thank you for your attention! Fábio Olivé
Yeah, but then it would be better to patch it. This fix is a sed one liner :) The best (upstream) patch would probably be to use a .in file and substitute the correct path during package building.
OK, I get your point now. :) Added karma to the update on bodhi.
pysdm-0.4.1-7.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
pysdm-0.4.1-7.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.