From 4d9abb51642ca03e0c125e2adeea726a818467ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Sun, 16 Oct 2005 21:26:42 +0000 Subject: [PATCH] =?UTF-8?q?*.la=20problemleri=20size=20g=C3=BCle=20g=C3=BC?= =?UTF-8?q?le...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/util.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pisi/util.py b/pisi/util.py index 8b457ca1..2c11afe5 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -388,7 +388,17 @@ def strip_directory(top, excludelist=[]): for root, dirs, files in os.walk(top): for fn in files: frpath = join_path(root, fn) - + + # Some upstream sources have buggy libtool and ltmain.sh with them, + # which causes wrong path entries in *.la files. And these wrong path + # entries sometimes triggers compile-time errors or linkage problems. + # Instead of patching all these buggy sources and maintain these patches, + # PISI removes wrong paths... + extension = os.path.splitext(frpath)[1] + if extension == ".la": + # FIXME: I'm regular expr. idiot, so one can convert this to python... + os.system("sed -i -e 's~-L/var/tmp/pisi/[[:graph:]]* ~~g' %s" % frpath) + # real path in .pisi package p = '/' + removepathprefix(top, frpath) strip = True