File: 0002-Take-Multiarch-into-account-when-looking-for-xtables.patch

package info (click to toggle)
python-iptables 0.11.0-4
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 652 kB
  • ctags: 1,098
  • sloc: python: 2,709; makefile: 93; ansic: 77
file content (30 lines) | stat: -rw-r--r-- 1,291 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From a2d9eef0da1527616b5cf0d1a1ef07fd3505f2b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig=20=28Debian/GNU=29?=
 <umlaeute@debian.org>
Date: Mon, 5 Sep 2016 20:57:45 +0200
Subject: Take Multiarch into account when looking for xtables

fixed typo in patch...
---
 iptc/xtables.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/iptc/xtables.py b/iptc/xtables.py
index 2cfccbb..c006468 100644
--- a/iptc/xtables.py
+++ b/iptc/xtables.py
@@ -694,9 +694,11 @@ _lib_xtables, xtables_version = find_library("xtables")
 _xtables_libdir = os.getenv("XTABLES_LIBDIR")
 if _xtables_libdir is None:
     import os.path
-    for xtdir in ["/lib/xtables", "/lib64/xtables", "/usr/lib/xtables",
-                  "/usr/lib/iptables", "/usr/lib64/xtables",
-                  "/usr/lib64/iptables", "/usr/local/lib/xtables"]:
+    import sysconfig
+    archtriplet = sysconfig.get_config_var('MULTIARCH')
+    for xtdir in ["/lib/xtables", "/lib/%s/xtables" % (archtriplet,), "/usr/lib/xtables",
+                  "/usr/lib/iptables", "/usr/lib/%s/xtables" % (archtriplet,),
+                  "/usr/lib/%s/iptables" % (archtriplet,), "/usr/local/lib/xtables"]:
         if os.path.isdir(xtdir):
             _xtables_libdir = xtdir
             break