If the host OS is using an older kernel and invoke the compile_ovs
function from the DevStack OVS library (devstack/lib/ovs), that function
will try to install the kernel-dev and kernel-headers package even if
the "build_modules" parameter is set to False.
That could fail because the specific kernel-* packages for the version
of the kernel running may not be present in the distro's repository
anymore. Plus, if the kernel modules will not be compiled, there's no
reason to install such packages.
This patch is fixing this problem by using the "build_modules" parameter
as a flag to whether install or not those kernel-* packages.
Signed-off-by: Lucas Alvares Gomes <email@example.com>
(cherry picked from commit cdfeeaf2bc)