Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1027)

Unified Diff: build/linux/pkg_config_wrapper.py

Issue 42340: Update the gyp Linux build: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/common.gypi ('k') | build/linux/system.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/linux/pkg_config_wrapper.py
===================================================================
--- build/linux/pkg_config_wrapper.py (revision 0)
+++ build/linux/pkg_config_wrapper.py (revision 0)
@@ -0,0 +1,30 @@
+#!/bin/env python
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Wrapper script for executing pkg-config with the arguments supplied
+on the command line and suppressing the exit status and error output
+when the error is simply that the specified package isn't installed.
+"""
+
+import sys
+import subprocess
+
+p = subprocess.Popen(['pkg-config'] + sys.argv[1:],
+ stderr=subprocess.PIPE)
+(stdout, stderr) = p.communicate()
+
+exit_status = p.wait()
+
+if exit_status == 1:
+ import re
+ if re.search('No package.*found', stderr):
+ # Exit status of 1 with a presumably "normal" not found message.
+ # Just swallow the "error."
+ sys.exit(0)
+
+sys.stderr.write(stderr)
+
+sys.exit(exit_status)
Property changes on: build/linux/pkg_config_wrapper.py
___________________________________________________________________
Added: svn:mergeinfo
Added: svn:eol-style
+ LF
« no previous file with comments | « build/common.gypi ('k') | build/linux/system.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698