utils/genrandconfig: add xenomai custom handling

Add custom cases to make sure that a random configuration with an empty
git, tarball location or version for xenomai doesn't fail. It reverts to
BR2_PACKAGE_XENOMAI_LATEST_VERSION in these cases.

Fixes:
 - http://autobuild.buildroot.org/results/19419759b4add0197b4e629d0b2216c2a07624b2

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Fabrice Fontaine 2022-08-09 16:31:26 +02:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent e4040d0d8e
commit 2bf6b06308

View File

@ -542,6 +542,27 @@ def fixup_config(sysinfo, configfile):
configlines.append('BR2_PACKAGE_REFPOLICY_UPSTREAM_VERSION=y\n')
configlines.remove('BR2_PACKAGE_REFPOLICY_CUSTOM_REPO_URL=""\n')
if 'BR2_PACKAGE_XENOMAI=y\n' in configlines and \
'BR2_PACKAGE_XENOMAI_CUSTOM_GIT=y\n' in configlines and \
'BR2_PACKAGE_XENOMAI_REPOSITORY=""\n' in configlines:
configlines.remove('BR2_PACKAGE_XENOMAI_CUSTOM_GIT=y\n')
configlines.append('BR2_PACKAGE_XENOMAI_LATEST_VERSION=y\n')
configlines.remove('BR2_PACKAGE_XENOMAI_REPOSITORY=""\n')
if 'BR2_PACKAGE_XENOMAI=y\n' in configlines and \
'BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL=y\n' in configlines and \
'BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL_URL=""\n' in configlines:
configlines.remove('BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL=y\n')
configlines.append('BR2_PACKAGE_XENOMAI_LATEST_VERSION=y\n')
configlines.remove('BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL_URL=""\n')
if 'BR2_PACKAGE_XENOMAI=y\n' in configlines and \
'BR2_PACKAGE_XENOMAI_CUSTOM_VERSION=y\n' in configlines and \
'BR2_PACKAGE_XENOMAI_CUSTOM_VERSION_VALUE=""\n' in configlines:
configlines.remove('BR2_PACKAGE_XENOMAI_CUSTOM_VERSION=y\n')
configlines.append('BR2_PACKAGE_XENOMAI_LATEST_VERSION=y\n')
configlines.remove('BR2_PACKAGE_XENOMAI_CUSTOM_VERSION_VALUE=""\n')
if 'BR2_PACKAGE_XVISOR=y\n' in configlines and \
'BR2_PACKAGE_XVISOR_USE_CUSTOM_CONFIG=y\n' in configlines and \
'BR2_PACKAGE_XVISOR_CUSTOM_CONFIG_FILE=""\n' in configlines: