firefox: More WIP

This commit is contained in:
Ray Donnelly
2015-07-13 23:39:11 +01:00
parent 8c0a119c60
commit 2bf5cd0a3a
8 changed files with 333 additions and 98 deletions

View File

@@ -0,0 +1,12 @@
diff -urN a/python/mach/mach/mixin/process.py b/python/mach/mach/mixin/process.py
--- a/python/mach/mach/mixin/process.py 2015-07-13 21:48:50.238620500 +0100
+++ b/python/mach/mach/mixin/process.py 2015-07-13 21:59:40.972145000 +0100
@@ -30,7 +30,7 @@
_in_msys = False
-if os.environ.get('MSYSTEM', None) == 'MINGW32':
+if os.environ.get('MSYSTEM', None) in ['MINGW32', 'MINGW64', 'MSYS']:
_in_msys = True
if not _current_shell.lower().endswith('.exe'):

View File

@@ -1,81 +0,0 @@
diff -urN firefox-38.0.5.orig/config/baseconfig.mk firefox-38.0.5/config/baseconfig.mk
--- firefox-38.0.5.orig/config/baseconfig.mk 2015-05-25 22:28:44.000000000 +0100
+++ firefox-38.0.5/config/baseconfig.mk 2015-06-28 23:29:12.430351300 +0100
@@ -31,9 +31,6 @@
$(error Pymake is no longer supported. Please upgrade to MozillaBuild 1.9 or newer and build with 'mach' or 'mozmake')
endif
-ifeq (a,$(firstword a$(subst /, ,$(abspath .))))
-$(error MSYS make is not supported)
-endif
# 4.0- happens to be greater than 4.0, lower than the mozmake version,
# and lower than 4.0.1 or 4.1, whatever next version of gnu make will
# be released.
diff -urN firefox-38.0.5.orig/mach firefox-38.0.5/mach
--- firefox-38.0.5.orig/mach 2015-05-25 22:28:46.000000000 +0100
+++ firefox-38.0.5/mach 2015-06-28 23:27:16.616644800 +0100
@@ -6,7 +6,7 @@
# The beginning of this script is both valid shell and valid python,
# such that the script starts with the shell and is reexecuted with
# the right python.
-'''which' python2.7 > /dev/null && exec python2.7 "$0" "$@" || exec python "$0" "$@"
+'''which' ${PYTHON} > /dev/null && exec ${PYTHON} "$0" "$@" || exec python2.7 "$0" "$@" || exec python "$0" "$@"
'''
from __future__ import print_function, unicode_literals
diff -urN firefox-38.0.5.orig/python/virtualenv/virtualenv.py firefox-38.0.5/python/virtualenv/virtualenv.py
--- firefox-38.0.5.orig/python/virtualenv/virtualenv.py 2015-05-25 22:28:56.000000000 +0100
+++ firefox-38.0.5/python/virtualenv/virtualenv.py 2015-07-03 18:05:22.708700600 +0100
@@ -45,6 +45,7 @@
is_pypy = hasattr(sys, 'pypy_version_info')
is_win = (sys.platform == 'win32')
is_cygwin = (sys.platform == 'cygwin')
+is_msys = (sys.platform == 'msys')
is_darwin = (sys.platform == 'darwin')
abiflags = getattr(sys, 'abiflags', '')
@@ -1276,7 +1277,7 @@
executable = sys.executable
shutil.copyfile(executable, py_executable)
make_exe(py_executable)
- if is_win or is_cygwin:
+ if is_win or is_cygwin or is_msys:
pythonw = os.path.join(os.path.dirname(sys.executable), 'pythonw.exe')
if os.path.exists(pythonw):
logger.info('Also created pythonw.exe')
@@ -1291,10 +1292,18 @@
os.unlink(python_d_dest)
# we need to copy the DLL to enforce that windows will load the correct one.
# may not exist if we are cygwin.
- py_executable_dll = 'python%s%s.dll' % (
- sys.version_info[0], sys.version_info[1])
- py_executable_dll_d = 'python%s%s_d.dll' % (
- sys.version_info[0], sys.version_info[1])
+ cygwin_msys_dll = None
+ python_dll_prefix = ''
+ if is_cygwin:
+ cygwin_msys_dll = 'cygwin1.dll'
+ python_dll_prefix = 'cygwin-'
+ if is_msys:
+ cygwin_msys_dll = 'msys-2.0.dll'
+ python_dll_prefix = 'msys-'
+ py_executable_dll = '%spython%s%s.dll' % (
+ python_dll_prefix, sys.version_info[0], sys.version_info[1])
+ py_executable_dll_d = '%spython%s%s_d.dll' % (
+ python_dll_prefix, sys.version_info[0], sys.version_info[1])
pythondll = os.path.join(os.path.dirname(sys.executable), py_executable_dll)
pythondll_d = os.path.join(os.path.dirname(sys.executable), py_executable_dll_d)
pythondll_d_dest = os.path.join(os.path.dirname(py_executable), py_executable_dll_d)
@@ -1307,6 +1316,12 @@
elif os.path.exists(pythondll_d_dest):
logger.info('Removed %s as the source does not exist' % pythondll_d_dest)
os.unlink(pythondll_d_dest)
+ if cygwin_msys_dll:
+ cygwin_msys_dll_dest = os.path.join(os.path.dirname(py_executable), cygwin_msys_dll)
+ cygwin_msys_dll = os.path.join(os.path.dirname(sys.executable), cygwin_msys_dll)
+ if os.path.exists(cygwin_msys_dll):
+ logger.info('Also copied Cygwin/MSYS2 core system dll %s' % cygwin_msys_dll)
+ shutil.copyfile(cygwin_msys_dll, cygwin_msys_dll_dest)
if is_pypy:
# make a symlink python --> pypy-c
python_executable = os.path.join(os.path.dirname(py_executable), 'python')

View File

@@ -0,0 +1,13 @@
diff -urN a/config/baseconfig.mk b/config/baseconfig.mk
--- a/config/baseconfig.mk 2015-07-13 22:05:44.022749700 +0100
+++ b/config/baseconfig.mk 2015-07-13 22:16:09.001405100 +0100
@@ -31,9 +31,6 @@
$(error Pymake is no longer supported. Please upgrade to MozillaBuild 1.9 or newer and build with 'mach' or 'mozmake')
endif
-ifeq (a,$(firstword a$(subst /, ,$(abspath .))))
-$(error MSYS make is not supported)
-endif
# 4.0- happens to be greater than 4.0, lower than the mozmake version,
# and lower than 4.0.1 or 4.1, whatever next version of gnu make will
# be released.

View File

@@ -0,0 +1,12 @@
diff -urN a/mach b/mach
--- a/mach 2015-07-13 22:22:35.106011700 +0100
+++ b/mach 2015-07-13 22:31:13.115823900 +0100
@@ -6,7 +6,7 @@
# The beginning of this script is both valid shell and valid python,
# such that the script starts with the shell and is reexecuted with
# the right python.
-'''which' python2.7 > /dev/null && exec python2.7 "$0" "$@" || exec python "$0" "$@"
+'''which' ${PYTHON} > /dev/null && exec ${PYTHON} "$0" "$@" || exec python2.7 "$0" "$@" || exec python "$0" "$@"
'''
from __future__ import print_function, unicode_literals

View File

@@ -0,0 +1,143 @@
diff -urN a/build/autoconf/config.status.m4 b/build/autoconf/config.status.m4
--- a/build/autoconf/config.status.m4 2015-07-13 22:34:59.729176500 +0100
+++ b/build/autoconf/config.status.m4 2015-07-13 22:47:20.516343000 +0100
@@ -87,7 +87,6 @@
case "$host_os" in
mingw*)
WIN_TOP_SRC=`cd $srcdir; pwd -W`
- encoding=mbcs
;;
esac
AC_SUBST(WIN_TOP_SRC)
diff -urN a/build/autoconf/python-virtualenv.m4 b/build/autoconf/python-virtualenv.m4
--- a/build/autoconf/python-virtualenv.m4 2015-07-13 22:34:59.729176500 +0100
+++ b/build/autoconf/python-virtualenv.m4 2015-07-13 22:47:20.520343200 +0100
@@ -56,14 +56,7 @@
$_virtualenv_topsrcdir $MOZ_BUILD_ROOT $MOZ_BUILD_ROOT/_virtualenv \
$_virtualenv_topsrcdir/build/virtualenv_packages.txt || exit 1
- case "$host_os" in
- mingw*)
- PYTHON=`cd $MOZ_BUILD_ROOT && pwd -W`/_virtualenv/Scripts/python.exe
- ;;
- *)
- PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python
- ;;
- esac
+ PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python
fi
AC_SUBST(PYTHON)
diff -urN a/configure b/configure
--- a/configure 2015-07-13 22:37:44.550806000 +0100
+++ b/configure 2015-07-13 22:47:20.534344000 +0100
@@ -1367,7 +1367,7 @@
exit 1
break
fi
-MOZ_BUILD_ROOT=`pwd -W 2>/dev/null || pwd`
+MOZ_BUILD_ROOT=`pwd`
@@ -1474,14 +1474,7 @@
$_virtualenv_topsrcdir $MOZ_BUILD_ROOT $MOZ_BUILD_ROOT/_virtualenv \
$_virtualenv_topsrcdir/build/virtualenv_packages.txt || exit 1
- case "$host_os" in
- mingw*)
- PYTHON=`cd $MOZ_BUILD_ROOT && pwd -W`/_virtualenv/Scripts/python.exe
- ;;
- *)
- PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python
- ;;
- esac
+ PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python
fi
diff -urN a/configure.in b/configure.in
--- a/configure.in 2015-07-13 22:36:56.161466600 +0100
+++ b/configure.in 2015-07-13 22:47:20.772353700 +0100
@@ -133,7 +133,7 @@
exit 1
break
fi
-MOZ_BUILD_ROOT=`pwd -W 2>/dev/null || pwd`
+MOZ_BUILD_ROOT=`pwd`
MOZ_PYTHON
diff -urN a/js/src/configure b/js/src/configure
--- a/js/src/configure 2015-07-13 22:38:51.104908900 +0100
+++ b/js/src/configure 2015-07-13 22:47:20.782353700 +0100
@@ -1061,7 +1061,7 @@
exit 1
break
fi
-MOZ_BUILD_ROOT=`pwd -W 2>/dev/null || pwd`
+MOZ_BUILD_ROOT=`pwd`
# Check whether --with-dist-dir or --without-dist-dir was given.
@@ -4404,14 +4404,7 @@
$_virtualenv_topsrcdir $MOZ_BUILD_ROOT $MOZ_BUILD_ROOT/_virtualenv \
$_virtualenv_topsrcdir/build/virtualenv_packages.txt || exit 1
- case "$host_os" in
- mingw*)
- PYTHON=`cd $MOZ_BUILD_ROOT && pwd -W`/_virtualenv/Scripts/python.exe
- ;;
- *)
- PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python
- ;;
- esac
+ PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python
fi
diff -urN a/python/virtualenv/virtualenv.py b/python/virtualenv/virtualenv.py
--- a/python/virtualenv/virtualenv.py 2015-07-13 22:35:33.117337000 +0100
+++ b/python/virtualenv/virtualenv.py 2015-07-13 22:47:20.797353800 +0100
@@ -45,6 +45,7 @@
is_pypy = hasattr(sys, 'pypy_version_info')
is_win = (sys.platform == 'win32')
is_cygwin = (sys.platform == 'cygwin')
+is_msys = (sys.platform == 'msys')
is_darwin = (sys.platform == 'darwin')
abiflags = getattr(sys, 'abiflags', '')
@@ -1276,7 +1277,7 @@
executable = sys.executable
shutil.copyfile(executable, py_executable)
make_exe(py_executable)
- if is_win or is_cygwin:
+ if is_win or is_cygwin or is_msys:
pythonw = os.path.join(os.path.dirname(sys.executable), 'pythonw.exe')
if os.path.exists(pythonw):
logger.info('Also created pythonw.exe')
@@ -1290,11 +1291,19 @@
logger.info('Removed python_d.exe as it is no longer at the source')
os.unlink(python_d_dest)
# we need to copy the DLL to enforce that windows will load the correct one.
- # may not exist if we are cygwin.
- py_executable_dll = 'python%s%s.dll' % (
- sys.version_info[0], sys.version_info[1])
- py_executable_dll_d = 'python%s%s_d.dll' % (
- sys.version_info[0], sys.version_info[1])
+ try:
+ # Cygwin, msys2 and MSYS2's mingw-w64-{i686,x86-64}-python all support this.
+ # .. disabled for now on msys2 as there's a dll address overlap issue:
+ # 0 [main] python 824 child_info_fork::abort: address space needed by 'msys-python2.7.dll' (0x6F0000) is already occupied
+ import sysconfig
+ py_executable_dll = 'unused' if is_msys else sysconfig.get_config_var('DLLLIBRARY')
+ py_executable_dll_d = 'unused'
+ except:
+ # .. but CPython doesn't.
+ py_executable_dll = 'python%s%s.dll' % (
+ sys.version_info[0], sys.version_info[1])
+ py_executable_dll_d = 'python%s%s_d.dll' % (
+ sys.version_info[0], sys.version_info[1])
pythondll = os.path.join(os.path.dirname(sys.executable), py_executable_dll)
pythondll_d = os.path.join(os.path.dirname(sys.executable), py_executable_dll_d)
pythondll_d_dest = os.path.join(os.path.dirname(py_executable), py_executable_dll_d)

View File

@@ -0,0 +1,72 @@
diff -urN a/python/virtualenv/virtualenv.py b/python/virtualenv/virtualenv.py
--- a/python/virtualenv/virtualenv.py 2015-07-13 22:51:52.604249800 +0100
+++ b/python/virtualenv/virtualenv.py 2015-07-13 23:03:40.898855100 +0100
@@ -41,6 +41,7 @@
join = os.path.join
py_version = 'python%s.%s' % (sys.version_info[0], sys.version_info[1])
+is_mingw = (sys.platform == 'win32' and 'GCC' in sys.version)
is_jython = sys.platform.startswith('java')
is_pypy = hasattr(sys, 'pypy_version_info')
is_win = (sys.platform == 'win32')
@@ -65,7 +66,7 @@
# Return a mapping of version -> Python executable
# Only provided for Windows, where the information in the registry is used
-if not is_win:
+if not is_win or is_mingw:
def get_installed_pythons():
return {}
else:
@@ -113,6 +114,14 @@
're', 'sre', 'sre_parse', 'sre_constants', 'sre_compile',
'zlib']
+if is_mingw:
+ REQUIRED_MODULES.extend(['functools', '__future__', 'logging', 'traceback',
+ 'weakref', 'collections', 'keyword', 'heapq',
+ 'atexit', 'optparse', 'textwrap', 'string',
+ 'contextlib', 'shutil', 'subprocess', 'threading',
+ 'tarfile', 'struct', 'copy', 'zipfile', 'io',
+ 'glob'])
+
REQUIRED_FILES = ['lib-dynload', 'config']
majver, minver = sys.version_info[:2]
@@ -953,7 +962,9 @@
logger.start_progress('Installing %s...' % (', '.join(project_names)))
logger.indent += 2
try:
- call_subprocess(cmd, show_stdout=False,
+ print('cmd is %s' % cmd)
+ print('PYTHONPATH="%s" PIP_FIND_LINKS="%s" PIP_USE_WHEEL=1 PIP_PRE=1 PIP_NO_INDEX=1' % (pythonpath, findlinks))
+ call_subprocess(cmd, show_stdout=True,
extra_env = {
'PYTHONPATH': pythonpath,
'PIP_FIND_LINKS': findlinks,
@@ -991,6 +1002,7 @@
to_install = ['setuptools']
if not no_pip:
to_install.append('pip')
+ print('install_wheel to_install=%s, py_executable=%s, search_dirs=%s' % (to_install, py_executable, search_dirs))
install_wheel(to_install, py_executable, search_dirs)
install_activate(home_dir, bin_dir, prompt)
@@ -1003,7 +1015,7 @@
where scripts go, etc)"""
# XXX: We'd use distutils.sysconfig.get_python_inc/lib but its
# prefix arg is broken: http://bugs.python.org/issue3386
- if is_win:
+ if is_win and not is_mingw:
# Windows has lots of problems with executables with spaces in
# the name; this function will remove them (using the ~1
# format):
@@ -1035,7 +1047,7 @@
lib_dir = home_dir
inc_dir = join(home_dir, 'include')
bin_dir = join(home_dir, 'bin')
- elif not is_win:
+ elif not is_win or is_mingw:
lib_dir = join(home_dir, 'lib', py_version)
multiarch_exec = '/usr/bin/multiarch-platform'
if is_executable_file(multiarch_exec):

View File

@@ -1,8 +1,12 @@
# Maintainer: Ray Donnelly <mingw.android@gmail.com>
# pushd /c/repo/mingw-w64-firefox/src
# PATH=/mingw64/bin:$PATH /mingw64/bin/python2.7.exe $PWD/firefox-39.0/python/virtualenv/virtualenv.py /tmp/test
# PATH=/mingw64/bin:$PATH PYTHONPATH="C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support/setuptools-11.0-py2.py3-none-any.whl;C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl" PIP_FIND_LINKS=". C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support" PIP_USE_WHEEL=1 PIP_PRE=1 PIP_NO_INDEX=1 C:/msys64t/tmp/test/bin/python2.7.exe -c 'import sys, pip; sys.exit(pip.main(["install", "--ignore-installed"] + sys.argv[1:]))' setuptools pip
_realname=firefox
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=38.0.5
pkgver=39.0
pkgrel=1
pkgdesc='Mozilla Firefox (mingw-w64)'
groups=("${MINGW_PACKAGE_PREFIX}")
@@ -10,20 +14,31 @@ arch=('any')
url='https://www.mozilla.org/firefox/'
license=('MPL2')
source=("http://ftp.mozilla.org/pub/mozilla.org/${_realname}/releases/${pkgver}/source/${_realname}-${pkgver}.source.tar.bz2"
"0001-Support-MSYS2-as-build-machine.patch"
".mozconfig.x86_64"
".mozconfig.i686"
"0001-Allow-MSYS2-shell.patch"
"0002-Allow-MSYS2-make.patch"
"0003-Use-PYTHON-env-var.patch"
"0004-Allow-MSYS2-python.patch"
"0005-Allow-mingw-w64-python.patch"
"debugging.patch"
"mozconfig.x86_64"
"mozconfig.i686"
"config.sub"
"config.guess")
noextract=("${_realname}-${pkgver}.source.tar.bz2")
sha1sums=('74da3e225d5b542e784549be63475802c45e1b02'
'dd46cd0b491d8f1f3103bb9557f788c3ce041499'
'9405456c0383b22255a494e0131cd3ea8f33b15d'
'dd68b964cceb9dbd632b24659871093803522f6e'
sha1sums=('32785daee7ddb9da8d7509ef095258fc58fe838e'
'1c0810fbfd6f336eec81e236c89c6c9ca0e79290'
'c269337da604ab047de5dea088dbbe8f547dfbea'
'2fd8904f036d2515e314b3d7510d8358add298d2'
'e3079d2151b89145134bd70d5b66bd772e5d56e6'
'ea32e4d47b46cb85173e686a4609e32e97f8d957'
'60d0ff16614804a1408feeed81b4a77a808d9a5a'
'36da1863d7f1f5ea7faa50f773a6dbdda405d7f5'
'3861e9d68ee67aa2dc6a087158054c29466cd4da'
'17c4f8628ea435c999be66ee4c2967fdaf3b2955'
'ffb6644dbad00413c668c833e3f3680d1d73aa53')
prepare() {
[ -d "${srcdir}"/${_realname}-${pkgver} ] && rm -rf ${_realname}-${pkgver}
tar -xf "${srcdir}"/${_realname}-${pkgver}.source.tar.bz2 || true
if [ -d "${srcdir}"/mozilla-beta ]; then
mv "${srcdir}"/mozilla-beta "${srcdir}"/${_realname}-${pkgver}
@@ -34,21 +49,50 @@ prepare() {
exit 1
fi
cd "${srcdir}"/${_realname}-${pkgver}
patch -p1 -i "${srcdir}"/0001-Support-MSYS2-as-build-machine.patch
# Mostly this patch is about msys2-python and mingw-w64-python not
# working with virtualenv. Really it needs splitting into two, one
# adding support for each of them. Most of the "is_win or True:"
# and "is_win and False:" stuff relates to mingw-w64-python and is
# to be replaced with proper detection and a variable "is_mingw".
patch -p1 -i "${srcdir}"/0001-Allow-MSYS2-shell.patch
patch -p1 -i "${srcdir}"/0002-Allow-MSYS2-make.patch
patch -p1 -i "${srcdir}"/0003-Use-PYTHON-env-var.patch
patch -p1 -i "${srcdir}"/0004-Allow-MSYS2-python.patch
patch -p1 -i "${srcdir}"/0005-Allow-mingw-w64-python.patch
patch -p1 -i "${srcdir}"/debugging.patch
find . -name config.sub -exec cp "${srcdir}"/config.sub {} \;
find . -name config.guess -exec cp "${srcdir}"/config.guess {} \;
(autoconf-2.13 && cd js/src && autoconf-2.13)
}
build() {
cd "${srcdir}"/${_realname}-${pkgver}
[ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH}
mkdir "${srcdir}"/build-${CARCH}
cd "${srcdir}"/build-${CARCH}
cp "${srcdir}"/.mozconfig.${CARCH} ${PWD}/.mozconfig
export PYTHON=/usr/bin/python2.7.exe
export MOZCONFIG=${PWD}/.mozconfig
make -f ../${_realname}-${pkgver}/client.mk configure
make -f ../${_realname}-${pkgver}/client.mk build
if [ "${CARCH}" = "i686" ]; then
_builddir=obj-i686-w64-mingw32
else
_builddir=obj-x86_64-w64-mingw32
fi
[ -d ${_builddir} ] && rm -rf "${_builddir}"
mkdir ${_builddir}
cp "${srcdir}"/mozconfig.${CARCH} ${_builddir}/.mozconfig
# export PYTHON=/usr/bin/python2.7.exe
export PYTHON=${MINGW_PREFIX}/bin/python2.7.exe
export MOZCONFIG=${PWD}/${_builddir}/.mozconfig
export MIDL=${MINGW_PREFIX}/bin/widl.exe
export MOZ_TOOLS=${MINGW_PREFIX}
set |awk '
BEGIN { _p = 1; }
$0~/^[^ ]+ \(\)/ { _p = 0; }
_p == 1
$0 == "}" { _p = 1; }
' |sed -r -e '/^BASH_(ARGC|ARGV|LINENO|SOURCE|VERSINFO)=/d;
/^(UID|EUID)=/d;
/^(FUNCNAME|GROUPS|PPID|SHELLOPTS|BASHOPTS)=/d;' > ./env-${CARCH}.sh
make -f client.mk configure
make -f client.mk build
}
check() {

View File

@@ -0,0 +1,20 @@
diff -urN a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py
--- a/python/mozbuild/mozbuild/frontend/emitter.py 2015-06-30 23:58:07.000000000 +0100
+++ b/python/mozbuild/mozbuild/frontend/emitter.py 2015-07-13 21:43:47.955204200 +0100
@@ -3,6 +3,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import unicode_literals
+from __future__ import print_function
import itertools
import json
@@ -672,6 +673,8 @@
def _process_sources(self, context, passthru):
for symbol in ('SOURCES', 'HOST_SOURCES', 'UNIFIED_SOURCES'):
for src in (context[symbol] or []):
+ print('sys.argv is %s' % sys.argv, file=sys.stderr)
+ print('checking if %s exists' % (mozpath.join(context.srcdir, src)), file=sys.stderr)
if not os.path.exists(mozpath.join(context.srcdir, src)):
raise SandboxValidationError('File listed in %s does not '
'exist: \'%s\'' % (symbol, src), context)