Bug 1617147 - Stop setting check_prog result to : for missing programs. r=nalexander,rstewart

This was cargo culted from the autoconf equivalent, and while it makes a
command that does "$(PROG) foo" work because it becomes ": foo", that
may or may not actually be a desirable outcome.

OTOH, we do have some places where there are some "ifdef PROG" that are
just plain wrong when PROG is always actually set.

One place I do know that does check if the value is not ":" is for
OBJCOPY, which is still set from autoconf.

All in all, looking at all the check_prog(allow_missing=True) we have in
python configure, it doesn't seem anything is checking for ":", and that
doesn't seem like the right status quo.

Differential Revision: https://phabricator.services.mozilla.com/D65276

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Hommey 2020-03-05 21:52:10 +00:00
Родитель 0f53515c02
Коммит 5da778f6e4
2 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@ -152,10 +152,6 @@ def check_prog(var, progs, what=None, input=None, allow_missing=False,
if not allow_missing or value:
raise FatalCheckError('Cannot find %s' % what)
@depends_if(check, progs, when=when)
def normalized_for_config(value, progs):
return ':' if value is None else value
set_config(var, normalized_for_config)
set_config(var, check)
return check

Просмотреть файл

@ -172,7 +172,7 @@ class TestChecksConfigure(unittest.TestCase):
'check_prog("FOO", ("unknown", "unknown-2", "unknown 3"), '
'allow_missing=True)')
self.assertEqual(status, 0)
self.assertEqual(config, {'FOO': ':'})
self.assertEqual(config, {})
self.assertEqual(out, 'checking for foo... not found\n')
@unittest.skipIf(not sys.platform.startswith('win'), 'Windows-only test')
@ -574,7 +574,6 @@ class TestChecksConfigure(unittest.TestCase):
self.assertEqual(status, 1)
self.assertEqual(config, {
'JAVA': java,
'JARSIGNER': ':',
})
self.assertEqual(out, textwrap.dedent('''\
checking for java... %s