chromium-src-build/linux
vapier@chromium.org f84d755521 python_arch: return "unknown" when file does not exist
The `file` program follows POSIX as outlined here:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/file.html

Specifically, this part causes troubles:
If the file named by the file operand does not exist, cannot be read, or
the type of the file named by the file operand cannot be determined, this
shall not be considered an error that affects the exit status.

With older versions of `file` (that does not conform to POSIX), this
script will exit 0 with "unknown" as its output when "$1" does not exist.
But with recent releases (that conform to POSIX), this script will exit 1
and can break the build.

Have the script explicitly check for the existence of $1 and if it does
not exist, then runt he unknown logic like normal.

BUG=chromium:332547
TEST=ran python_arch.sh on bogus files with new & old `file` programs

Review URL: https://codereview.chromium.org/137433002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@244778 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-14 18:52:34 +00:00
..
unbundle Linux: switch to using pkg-config for unbundled ICU 2013-10-16 21:32:10 +00:00
chrome_linux.croc Exclude ChromeOS directories and files from mac win linux. 2010-10-04 22:56:50 +00:00
dump_app_syms Linux: Change dump_app_syms script to pass -r to dump_syms. This option was added in Breakpad r1163. 2013-05-07 21:25:03 +00:00
install-arm-sysroot.py Update arm sysroot image used by arm/linux builder. 2013-11-04 22:25:24 +00:00
install-chromeos-fonts.py Wrong file/dir owner and permission for installed Chrome OS fonts 2013-02-27 18:03:23 +00:00
pkg-config-wrapper if PKG_CONFIG_PATH is already set, pkg-config-wrapper should use these dirs too 2013-02-22 21:45:47 +00:00
python_arch.sh python_arch: return "unknown" when file does not exist 2014-01-14 18:52:34 +00:00
rewrite_dirs.py Fix python scripts in src/build/ 2011-11-23 19:13:44 +00:00
sysroot_ld_path.sh Fix "No such file or directory" error in sysroot_ld_path.sh if ld.so.conf include pattern doesn't match any file. 2013-07-29 21:51:23 +00:00
system.gyp Use third_party/fontconfig for embedded builds 2014-01-13 21:27:42 +00:00