RBM does not properly handle boolean expressions in config files
Relevant part of <project>/config
:
- filename: TestPackFromSerializationExceedsSizeLimit.patch
enable: '[% c("var/linux-i686") %] || [% c("var/windows-i686") %]'
And for <project>/build
echo "**VAR OUTPUT**"
echo "var/linux-i686: " [% c("var/linux-i686") %]
echo "var/windows-i686: " [% c("var/windows-i686") %]
ls -al $rootdir
[% IF c("var/linux-i686") || c("var/windows-i686") -%]
patch -p1 < $rootdir/TestPackFromSerializationExceedsSizeLimit.patch
[% END -%]
Expected behaviour is that:
- The file
TestPackFromSerializationExceedsSizeLimit.patch
is only included onlinux-i686
andwindows-i686
targets
Actual behaviour is that:
- The file is included on all targets (Incorrect behaviour)
In the build file, the boolean expression is properly handled, and the patch is only applied on relevant platforms
The log output (<project>-x86_64.log
) shows the following:
+ echo '**VAR OUTPUT**'
**VAR OUTPUT**
+ echo 'var/linux-i686: '
var/linux-i686:
+ echo 'var/windows-i686: '
var/windows-i686:
+ ls -al /var/tmp/tmp.nbiNyZuPLS
total 1052172
drwx------ 2 rbm rbm 4096 Dec 8 07:52 .
drwxrwxrwt 8 root root 4096 Dec 8 07:53 ..
-rw-rw-r-- 1 rbm rbm 659 Dec 8 07:52 TestPackFromSerializationExceedsSizeLimit.patch
-rwx------ 1 rbm rbm 2557 Dec 8 07:52 build
-rw-r--r-- 1 rbm rbm 17890847 Dec 8 07:52 cmake-3.22.0-cfcc6f.tar.gz
-rw-r--r-- 1 rbm rbm 562297199 Dec 8 07:52 container-image_buster-amd64-daf55294abba.tar.gz
-rw-r--r-- 1 rbm rbm 460648080 Dec 8 07:52 gcc-10.2.0-1ce3c2.tar.gz
-rw-rw-r-- 1 rbm rbm 6354076 Oct 28 21:07 protobuf-3.19.1.tar.gz
-rw-r--r-- 1 rbm rbm 30199609 Dec 8 07:52 protoc-3.19.1-4e4f2e.tar.gz
Edited by Marco Simonelli