Changeset: 7d64e2737ebb for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7d64e2737ebb Modified Files: testing/Mtest.py.in tools/merovingian/utils/utils.c Branch: default Log Message:
Merge with Jul2017 diffs (62 lines): diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -3781,7 +3781,11 @@ def main(argv) : if not os.path.exists(rdir): os.makedirs(rdir) if CheckExec('php'): - proc = process.Popen(['php', '-d', 'include_path=${PHP_INCPATH}', '-r', "require 'monetdb/php_monetdb.php';"], + phpcmd = ['php'] + if 'PHP_INCPATH' in os.environ: + phpcmd.extend(['-d', 'include_path=%s' % os.environ['PHP_INCPATH']]) + phpcmd.extend(['-r', "require 'monetdb/php_monetdb.php';"]) + proc = process.Popen(phpcmd, stdout = process.PIPE, stderr = process.PIPE, universal_newlines = True) php_out, php_err = proc.communicate() diff --git a/tools/merovingian/utils/utils.c b/tools/merovingian/utils/utils.c --- a/tools/merovingian/utils/utils.c +++ b/tools/merovingian/utils/utils.c @@ -85,7 +85,13 @@ readConfFileFull(confkeyval *list, FILE /* iterate until the end of the array */ while (list->key != NULL) { - /* If we already have PROPLENGTH entries, */ + /* If we already have PROPLENGTH entries, we cannot add any more. Do + * read the file because it might specify a different value for an + * existing property. + * + * TODO: This is an arbitrary limitation and should either be justified + * sufficiently or removed. + */ if (cnt >= PROPLENGTH - 1) { break; } @@ -101,11 +107,14 @@ readConfFileFull(confkeyval *list, FILE /* strip trailing newline */ val = strtok(val, "\n"); if ((err = setConfValForKey(t, key, val)) != NULL) { - if (strstr(err, "is not recognized") == NULL) { - /* If we already have more than PROPLENGTH - * entries, ignore every ad hoc property + if (strstr(err, "is not recognized") != NULL) { + /* If we already have PROPLENGTH entries in the list, ignore + * every ad hoc property, but continue reading the file + * because a different value might be specified later in the + * file for one of the properties we have already in the list. */ if (cnt >= PROPLENGTH - 1) { + free(err); continue; } list->key = strdup(key); @@ -279,6 +288,9 @@ setConfValForKey(confkeyval *list, const } list++; } + /* XXX: Do NOT change this error message or readConfFileFull will stop + * working as expected. + */ snprintf(buf, sizeof(buf), "key '%s' is not recognized, internal error", key); return(strdup(buf)); } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list