Menuselect enabled option disappears

I’m having some trouble building Asterisk with ODBC voicemail module. This is a non-interactive install, all scripted. The module seems to be enabled when I ask for it but then is again disabled with the next run of menuselect. Is this a bug I should be reporting or just something I’m not understanding about how menuselect works?

$ grep MENUSELECT_APPS menuselect.makeopts
MENUSELECT_APPS=app_skel app_voicemail_imap app_voicemail_odbc app_ivrdemo app_saycounted app_statsd app_meetme
$ menuselect/menuselect --enable app_voicemail_odbc
$ grep MENUSELECT_APPS menuselect.makeopts
MENUSELECT_APPS=app_skel app_voicemail_imap app_ivrdemo app_saycounted app_statsd app_meetme
$ menuselect/menuselect --disable res_config_pgsql --disable cdr_pgsql --disable cel_pgsql
$ grep MENUSELECT_APPS menuselect.makeopts
MENUSELECT_APPS=app_skel app_voicemail_imap app_voicemail_odbc app_ivrdemo app_saycounted app_statsd app_meetme 

If you don’t specify the filename as the last argument then menuselect won’t examine the existing file and essentially will overwrite it. So:

menuselect/menuselect --enable app_voicemail_odbc menuselect.makeopts
menuselect/menuselect --disable res_config_pgsql --disable cdr_pgsql --disable cel_pgsql menuselect.makeopts

Will do as you want.

It does indeed. Previously I’d always run one monolithic command and never needed that argument before; now I’m using conditionals and running it multiple times so that counterintuitive behaviour is new to me. Thanks!