]> git.ipfire.org Git - thirdparty/asterisk.git/commit
menuselect: Don't erroneously recompile modules.
authorNaveen Albert <asterisk@phreaknet.org>
Sat, 5 Feb 2022 15:03:21 +0000 (15:03 +0000)
committerKevin Harwell <kharwell@digium.com>
Thu, 28 Apr 2022 19:55:57 +0000 (14:55 -0500)
commit086c7728a7592fdf4014a74c76100fd5cd7d395c
tree39c419082da89832eeee238fc0f9dd3ca1d5f1dc
parent0018f31353dc3c728e30986bffe3125b3212f40c
menuselect: Don't erroneously recompile modules.

A bug in menuselect can cause modules that are disabled
by default to be recompiled every time a recompilation
occurs. This occurs for module categories that are NOT
positive output, as for these categories, the modules
contained in the makeopts file indicate modules which
should NOT be selected. The existing procedure of iterating
through these modules to mark modules as present is thus
insufficient. This has led to modules with a default_enabled
tag of "no" to get deleted and recompiled every time, even
when they haven't changed.

To fix this, we now modify the mark as present behavior
for module categories that are not positive output. For
these, we start by iterating through the module tree
and marking all modules as present, then go back and
mark anything contained in the makeopts file as not
present. This ensures that makeopt selections are actually
used properly, regardless of whether a module category
uses positive output or not.

ASTERISK-29728 #close

Change-Id: Idf2974c4ed8d0ba3738a92f08a6082b234277b95
menuselect/menuselect.c