Changeset View
Changeset View
Standalone View
Standalone View
print/hplip/files/patch-installer_dcheck.py
- This file was moved from print/hplip/files/patch-installer__dcheck.py.
--- installer/dcheck.py.orig 2013-02-21 18:40:18.368768559 -0800 | --- installer/dcheck.py.orig 2016-08-26 10:05:26 UTC | ||||
+++ installer/dcheck.py 2013-02-21 18:43:03.116783408 -0800 | +++ installer/dcheck.py | ||||
@@ -46,7 +46,11 @@ | @@ -48,7 +48,11 @@ mod_output = '' | ||||
def update_ld_output(): | def update_ld_output(): | ||||
# For library checks | # For library checks | ||||
global ld_output | global ld_output | ||||
- status, ld_output = utils.run('%s -p' % os.path.join(utils.which('ldconfig'), 'ldconfig'), log_output=False) | - status, ld_output = utils.run('%s -p' % os.path.join(utils.which('ldconfig'), 'ldconfig'), log_output=False) | ||||
+ if sys.platform.startswith('freebsd'): | + if sys.platform.startswith('freebsd'): | ||||
+ ld_cmd = '%s -r' | + ld_cmd = '%s -r' | ||||
+ else: # linux | + else: # linux | ||||
+ ld_cmd = '%s -p' | + ld_cmd = '%s -p' | ||||
+ status, ld_output = utils.run(ld_cmd % os.path.join(utils.which('ldconfig'), 'ldconfig'), log_output=False) | + status, ld_output = utils.run(ld_cmd % os.path.join(utils.which('ldconfig'), 'ldconfig'), log_output=False) | ||||
if status != 0: | if status != 0: | ||||
log.debug("ldconfig failed.") | log.debug("ldconfig failed.") | ||||
@@ -360,6 +364,8 @@ | @@ -378,6 +382,8 @@ def get_libpthread_version(): | ||||
except ImportError: | except ImportError: | ||||
return '-' | return '-' | ||||
else: | else: | ||||
+ if sys.platform.startswith('freebsd'): | + if sys.platform.startswith('freebsd'): | ||||
+ return '-' | + return '-' | ||||
# LIBC = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True) | # LIBC = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True) | ||||
LIBC = ctypes.CDLL(ctypes.util.find_library('c'),ctypes.DEFAULT_MODE,None, True) | LIBC = ctypes.CDLL(ctypes.util.find_library('c'),ctypes.DEFAULT_MODE,None, True) | ||||
LIBC.gnu_get_libc_version.restype = ctypes.c_char_p | LIBC.gnu_get_libc_version.restype = ctypes.c_char_p |