aboutsummaryrefslogtreecommitdiff
path: root/print/hplip/files/patch-installer__dcheck.py
blob: 3762663de4d7d37f260226c195f1761982f93b6e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- ./installer/dcheck.py.orig	2012-11-20 09:51:37.000000000 +0000
+++ ./installer/dcheck.py	2013-01-22 14:25:58.685224662 +0000
@@ -44,7 +44,11 @@
 def update_ld_output():
     # For library checks
     global ld_output
-    status, ld_output = utils.run('%s -p' % os.path.join(utils.which('ldconfig'), 'ldconfig'), log_output=False)
+    if sys.platform.startswith('freebsd'):
+        ld_cmd = '%s -r'
+    else: # linux
+        ld_cmd = '%s -p'
+    status, ld_output = utils.run(ld_cmd % os.path.join(utils.which('ldconfig'), 'ldconfig'), log_output=False)
 
     if status != 0:
         log.debug("ldconfig failed.")
@@ -373,6 +377,8 @@
     except ImportError:
         return '-'
     else:
+        if sys.platform.startswith('freebsd'):
+            return '-'
         LIBC = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
         LIBC.gnu_get_libc_version.restype = ctypes.c_char_p
         return LIBC.gnu_get_libc_version()