From 3803157c78a49e771207704da023f06a73a1dcb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Sun, 23 Dec 2007 16:00:01 +0000 Subject: [PATCH] chrpath in devel --- pisi/util.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pisi/util.py b/pisi/util.py index fa7fdb83..93b4c668 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -525,6 +525,13 @@ def strip_file(filepath, outpath): if ret: ctx.ui.warning(_("strip command failed for file '%s'!") % f) + def run_chrpath(f): + """ remove rpath info from binary """ + p = os.popen("chrpath -d %s" % f) + ret = p.close() + if ret: + ctx.ui.warning(_("chrpath command failed for file '%s'!") % f) + def save_elf_debug(f, o): """copy debug info into file.debug file""" p = os.popen("objcopy --only-keep-debug %s %s%s" % (f, o, ctx.const.debug_file_suffix)) @@ -547,6 +554,7 @@ def strip_file(filepath, outpath): check_dir(os.path.dirname(outpath)) save_elf_debug(filepath, outpath) run_strip(filepath) + run_chrpath(filepath) return True elif "SB shared object" in o: @@ -554,6 +562,7 @@ def strip_file(filepath, outpath): check_dir(os.path.dirname(outpath)) save_elf_debug(filepath, outpath) run_strip(filepath, "--strip-unneeded") + run_chrpath(filepath) # FIXME: warn for TEXTREL return True