From 28476aa719845094b20c9ebb58506da7b514b789 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 10 May 2015 01:42:59 +0300 Subject: [PATCH] Pass gracefully if dpkg-architecture is not installed. --- mesonlib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mesonlib.py b/mesonlib.py index cae54274aa03..c04e7afc4914 100644 --- a/mesonlib.py +++ b/mesonlib.py @@ -132,9 +132,11 @@ def version_compare(vstr1, vstr2): return cmpop(varr1, varr2) def default_libdir(): - if os.path.isfile('/etc/debian_version'): + try: archpath = subprocess.check_output(['dpkg-architecture', '-qDEB_HOST_MULTIARCH']).decode().strip() return 'lib/' + archpath + except FileNotFoundError: + pass if os.path.isdir('/usr/lib64'): return 'lib64' return 'lib'