[gnome-ostree] ostbuild: recurse into subdirectories when deleting .la files
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] ostbuild: recurse into subdirectories when deleting .la files
- Date: Fri, 4 Jan 2013 00:42:42 +0000 (UTC)
commit fb701008bf30eae29db286317f54b3db17aa38ac
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Jan 1 23:52:50 2013 +0100
ostbuild: recurse into subdirectories when deleting .la files
.la files bring only problems when using shared linking, and should be never
installed.
https://bugzilla.gnome.org/show_bug.cgi?id=690960
src/ostbuild/ostree-build-compile-one | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/ostbuild/ostree-build-compile-one b/src/ostbuild/ostree-build-compile-one
index e32a62a..816921b 100755
--- a/src/ostbuild/ostree-build-compile-one
+++ b/src/ostbuild/ostree-build-compile-one
@@ -222,7 +222,7 @@ def main(args):
tempfiles.append(tempdir)
args = ['make', 'install', 'DESTDIR=' + tempdir]
run_sync(args, cwd=builddir)
-
+
runtime_path = os.path.join(ostbuild_resultdir, 'runtime')
devel_path = os.path.join(ostbuild_resultdir, 'devel')
doc_path = os.path.join(ostbuild_resultdir, 'doc')
@@ -240,12 +240,10 @@ def main(args):
# Move symbolic links for shared libraries as well
# as static libraries. And delete all .la files.
- for libdirname in ['lib', 'usr/lib']:
- path = os.path.join(tempdir, libdirname)
- if not os.path.isdir(path):
- continue
- for filename in os.listdir(path):
- subpath = os.path.join(path, filename)
+ libdir = os.path.join(tempdir, 'usr/lib')
+ for dirpath, subdirs, files in os.walk(libdir):
+ for filename in files:
+ subpath = os.path.join(dirpath, filename)
if filename.endswith('.la'):
os.unlink(subpath)
continue
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]