1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00

Remove obsolete --perl-option option.

This option was used when Perl was executed instead of being embedded.

It has been obsolete for a long time so remove it.
This commit is contained in:
David Steele 2019-12-10 13:28:15 -05:00
parent d0ba8ff58c
commit c933f12f9c
9 changed files with 1 additions and 99 deletions

View File

@ -202,10 +202,6 @@ use constant CFGOPT_LOG_PATH => 'log-path
use constant CFGOPT_SPOOL_PATH => 'spool-path';
push @EXPORT, qw(CFGOPT_SPOOL_PATH);
# Perl
use constant CFGOPT_PERL_OPTION => 'perl-option';
push @EXPORT, qw(CFGOPT_PERL_OPTION);
# Logging
use constant CFGOPT_LOG_LEVEL_CONSOLE => 'log-level-console';
push @EXPORT, qw(CFGOPT_LOG_LEVEL_CONSOLE);
@ -1388,32 +1384,6 @@ my %hConfigDefine =
},
},
&CFGOPT_PERL_OPTION =>
{
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
&CFGDEF_TYPE => CFGDEF_TYPE_LIST,
&CFGDEF_REQUIRED => false,
&CFGDEF_INTERNAL => true,
&CFGDEF_COMMAND =>
{
&CFGCMD_ARCHIVE_GET => {},
&CFGCMD_ARCHIVE_GET_ASYNC => {},
&CFGCMD_ARCHIVE_PUSH => {},
&CFGCMD_ARCHIVE_PUSH_ASYNC => {},
&CFGCMD_BACKUP => {},
&CFGCMD_CHECK => {},
&CFGCMD_EXPIRE => {},
&CFGCMD_INFO => {},
&CFGCMD_LOCAL => {},
&CFGCMD_REMOTE => {},
&CFGCMD_RESTORE => {},
&CFGCMD_STANZA_CREATE => {},
&CFGCMD_STANZA_UPGRADE => {},
&CFGCMD_START => {},
&CFGCMD_STOP => {},
},
},
&CFGOPT_PROTOCOL_TIMEOUT =>
{
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,

View File

@ -173,7 +173,6 @@ sub libcAutoExportTag
'CFGOPT_NEUTRAL_UMASK',
'CFGOPT_ONLINE',
'CFGOPT_OUTPUT',
'CFGOPT_PERL_OPTION',
'CFGOPT_PG_HOST',
'CFGOPT_PG_HOST2',
'CFGOPT_PG_HOST3',

View File

@ -340,7 +340,6 @@ STRING_EXTERN(CFGOPT_MANIFEST_SAVE_THRESHOLD_STR, CFGOPT_MANIF
STRING_EXTERN(CFGOPT_NEUTRAL_UMASK_STR, CFGOPT_NEUTRAL_UMASK);
STRING_EXTERN(CFGOPT_ONLINE_STR, CFGOPT_ONLINE);
STRING_EXTERN(CFGOPT_OUTPUT_STR, CFGOPT_OUTPUT);
STRING_EXTERN(CFGOPT_PERL_OPTION_STR, CFGOPT_PERL_OPTION);
STRING_EXTERN(CFGOPT_PG1_HOST_STR, CFGOPT_PG1_HOST);
STRING_EXTERN(CFGOPT_PG2_HOST_STR, CFGOPT_PG2_HOST);
STRING_EXTERN(CFGOPT_PG3_HOST_STR, CFGOPT_PG3_HOST);
@ -777,14 +776,6 @@ static ConfigOptionData configOptionData[CFG_OPTION_TOTAL] = CONFIG_OPTION_LIST
CONFIG_OPTION_DEFINE_ID(cfgDefOptOutput)
)
//------------------------------------------------------------------------------------------------------------------------------
CONFIG_OPTION
(
CONFIG_OPTION_NAME(CFGOPT_PERL_OPTION)
CONFIG_OPTION_INDEX(0)
CONFIG_OPTION_DEFINE_ID(cfgDefOptPerlOption)
)
//------------------------------------------------------------------------------------------------------------------------------
CONFIG_OPTION
(

View File

@ -129,8 +129,6 @@ Option constants
STRING_DECLARE(CFGOPT_ONLINE_STR);
#define CFGOPT_OUTPUT "output"
STRING_DECLARE(CFGOPT_OUTPUT_STR);
#define CFGOPT_PERL_OPTION "perl-option"
STRING_DECLARE(CFGOPT_PERL_OPTION_STR);
#define CFGOPT_PG1_HOST "pg1-host"
STRING_DECLARE(CFGOPT_PG1_HOST_STR);
#define CFGOPT_PG1_HOST_CMD "pg1-host-cmd"
@ -384,7 +382,7 @@ Option constants
#define CFGOPT_TYPE "type"
STRING_DECLARE(CFGOPT_TYPE_STR);
#define CFG_OPTION_TOTAL 165
#define CFG_OPTION_TOTAL 164
/***********************************************************************************************************************************
Command enum
@ -456,7 +454,6 @@ typedef enum
cfgOptNeutralUmask,
cfgOptOnline,
cfgOptOutput,
cfgOptPerlOption,
cfgOptPgHost,
cfgOptPgHost2,
cfgOptPgHost3,

View File

@ -1943,38 +1943,6 @@ static ConfigDefineOptionData configDefineOptionData[] = CFGDEFDATA_OPTION_LIST
)
)
// -----------------------------------------------------------------------------------------------------------------------------
CFGDEFDATA_OPTION
(
CFGDEFDATA_OPTION_NAME("perl-option")
CFGDEFDATA_OPTION_REQUIRED(false)
CFGDEFDATA_OPTION_SECTION(cfgDefSectionGlobal)
CFGDEFDATA_OPTION_TYPE(cfgDefOptTypeList)
CFGDEFDATA_OPTION_INTERNAL(true)
CFGDEFDATA_OPTION_INDEX_TOTAL(1)
CFGDEFDATA_OPTION_SECURE(false)
CFGDEFDATA_OPTION_COMMAND_LIST
(
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdArchiveGet)
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdArchiveGetAsync)
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdArchivePush)
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdArchivePushAsync)
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdBackup)
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdCheck)
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdExpire)
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdInfo)
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdLocal)
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdRemote)
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdRestore)
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdStanzaCreate)
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdStanzaUpgrade)
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdStart)
CFGDEFDATA_OPTION_COMMAND(cfgDefCmdStop)
)
)
// -----------------------------------------------------------------------------------------------------------------------------
CFGDEFDATA_OPTION
(

View File

@ -90,7 +90,6 @@ typedef enum
cfgDefOptNeutralUmask,
cfgDefOptOnline,
cfgDefOptOutput,
cfgDefOptPerlOption,
cfgDefOptPgHost,
cfgDefOptPgHostCmd,
cfgDefOptPgHostConfig,

View File

@ -472,18 +472,6 @@ static const struct option optionList[] =
.val = PARSE_OPTION_FLAG | cfgOptOutput,
},
// perl-option option
// -----------------------------------------------------------------------------------------------------------------------------
{
.name = CFGOPT_PERL_OPTION,
.has_arg = required_argument,
.val = PARSE_OPTION_FLAG | cfgOptPerlOption,
},
{
.name = "reset-" CFGOPT_PERL_OPTION,
.val = PARSE_OPTION_FLAG | PARSE_RESET_FLAG | cfgOptPerlOption,
},
// pg-host option and deprecations
// -----------------------------------------------------------------------------------------------------------------------------
{
@ -2294,7 +2282,6 @@ static const ConfigOption optionResolveOrder[] =
cfgOptNeutralUmask,
cfgOptOnline,
cfgOptOutput,
cfgOptPerlOption,
cfgOptPgHost,
cfgOptPgHost + 1,
cfgOptPgHost + 2,

View File

@ -7581,7 +7581,6 @@ static const EmbeddedModule embeddedModule[] =
"'CFGOPT_NEUTRAL_UMASK',\n"
"'CFGOPT_ONLINE',\n"
"'CFGOPT_OUTPUT',\n"
"'CFGOPT_PERL_OPTION',\n"
"'CFGOPT_PG_HOST',\n"
"'CFGOPT_PG_HOST2',\n"
"'CFGOPT_PG_HOST3',\n"

View File

@ -97,19 +97,11 @@ testRun(void)
strLstAdd(commandParamList, strNew("param2"));
cfgCommandParamSet(commandParamList);
cfgOptionValidSet(cfgOptPerlOption, true);
StringList *perlList = strLstNew();
strLstAdd(perlList, strNew("-I."));
strLstAdd(perlList, strNew("-MDevel::Cover=-silent,1"));
cfgOptionSet(cfgOptPerlOption, cfgSourceParam, varNewVarLst(varLstNewStrLst(perlList)));
TEST_RESULT_STR(
strPtr(perlOptionJson()),
"{"
"\"db-include\":{\"negate\":false,\"reset\":false,\"source\":\"param\",\"valid\":true,"
"\"value\":{\"db1\":true,\"db2\":true}},"
"\"perl-option\":{\"negate\":false,\"reset\":false,\"source\":\"param\",\"valid\":true,"
"\"value\":{\"-I.\":true,\"-MDevel::Cover=-silent,1\":true}},"
"\"recovery-option\":{\"negate\":false,\"reset\":false,\"source\":\"param\",\"valid\":true,"
"\"value\":{\"primary_conn_info\":\"blah\",\"standby_mode\":\"on\"}}"
"}",