Univention Bugzilla – Bug 52180
Code duplication script/preup.sh and checks/pre-update-checks-5.0
Last modified: 2021-09-07 09:16:19 CEST
Both script should perform the same nearly the same checks, but are not kept in-sync. The common code should be extracted to a shared file, which is then merged at package build time into the version installed in the package respectively copied to the public repository for pre-download. The preup.sh script also has the draw-back, that it checks one condition at a time, which forces the admin to start the update many times until the update is finally performed. Similar to the pre-update-checks-5.0 script all checks should be performed and should print out their verdict - if any check fails the script should abort only at the end to prevent the update,.
(In reply to Philipp Hahn from comment #0) > Both script should perform the same nearly the same checks, but are not kept > in-sync. > The common code should be extracted to a shared file, which is then merged > at package build time into the version installed in the package respectively > copied to the public repository for pre-download. This has already been done by git:ad2d88025fc24aded2181eae98db21b2adec21ba for UCS 5.0-0 as part of Bug #51655: The 'preup.sh' scripts is build by 'debian/rules:dh_install' during package built time by including 'script/check.sh' into the wrapper 'script/preup.sh'. > The preup.sh script also has the draw-back, that it checks one condition at > a time, which forces the admin to start the update many times until the > update is finally performed. > Similar to the pre-update-checks-5.0 script all checks should be performed > and should print out their verdict - if any check fails the script should > abort only at the end to prevent the update,. This also has been fixed an `check.sh` now executes all tests and no longer aborts on the first failing test.
very nice!