Univention Bugzilla – Bug 50100
Switch from call to check_call in doIt from our debhelper
Last modified: 2021-05-25 15:59:06 CEST
Switch from "call" to "check_call" in doIt from our debhelper The base/univention-config-registry/python/univention/debhelper.py:doIt function uses subprocess.call and returns the process return code. I would prefer using check_call since I think that might have caught bug 50098. A quick grep shows that out of 55 calls to doIt, only 4 seem to check the return code. Note: this might break a few builds
Implementation moved to packaging/univention-debhelper/univention/debhelper.py This also would have fixed Bug #32658
univention-management-console-module-adtakeover (6.0.1-11) e9793ec6df98 | Bug #50100: remove unused UMC files univention-management-console-module-lib (9.0.0-1) e44faaa5ea60 | Bug #50100 UMC lib: do not reference not existing category definition univention-config-registry (15.0.2-0) dbb125d95544 | Bug #50100 UCR: use check_call for error handling in doIt() univention-app-appliance (3.0.1-11) e9793ec6df98 | Bug #50100: remove unused UMC files changelog-5.0-0.xml 3c5b4e5f9143 | Changelog Bug #50100 univention-portal (3.0.2-8) e9793ec6df98 | Bug #50100: remove unused UMC files univention-debhelper (2.0.0-2) dbb125d95544 | Bug #50100 UCR: use check_call for error handling in doIt() univention-management-console (12.0.0-13) 7723f4329062 | Bug #50100: do not require UMC module definition for UMC core
verified: - doIt function now raises exception on non zero exit code python3 -c 'import univention.debhelper; univention.debhelper.doIt("/bin/false");' Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3/dist-packages/univention/debhelper.py", line 56, in doIt return subprocess.check_call(argv) File "/usr/lib/python3.7/subprocess.py", line 347, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '('/bin/false',)' returned non-zero exit status 1. It seems the change does not brake anything more then the packages Florian Best already has fixed, otherwise we should already have noticed because packages would not build.
UCS 5.0 has been released: https://docs.software-univention.de/release-notes-5.0-0-en.html https://docs.software-univention.de/release-notes-5.0-0-de.html If this error occurs again, please use "Clone This Bug".