Merge pull request #292 from MilhouseVH/fix_distro_tool2

distro-tool: Workaround packages that call exit
This commit is contained in:
Christian Hewitt 2016-05-04 08:36:05 +04:00
commit 01dfc98b4e

View File

@ -456,9 +456,9 @@ class MyThread(threading.Thread):
msgs = []
if pkg_version == "" or pkg_url == "":
if pkg_version == "" or pkg_version == "0.0invalid" or pkg_url == "":
if pkg_section != "virtual":
MyUtility.show(msgs, 0, "cyan", "BLANK URL OR VERSION", "%s (ver [%s], url [%s])" % (pkg_name, pkg_version, pkg_url))
MyUtility.show(msgs, 0, "cyan", "UNKNOWN VER OR URL", "%s (ver [%s], url [%s])" % (pkg_name, pkg_version, pkg_url))
self.output_queue.put(msgs)
continue
@ -670,6 +670,11 @@ generate_work() {
fi
(
# Override exit function so that packages calling exit don't terminate this sub-shell
exit() {
:
}
init_progress
cd $LIBREELEC_DIR
@ -678,7 +683,7 @@ generate_work() {
for package_name in ${packages}; do
[ ${PROGRESS} == yes ] && progress ${pcount}
. config/options ${package_name} 2>/dev/null || true
source config/options ${package_name} 2>/dev/null || true
if [ -n "${revision}" ]; then
PKG_URL="${PKG_URL/${PKG_VERSION}/${revision}}"