0compile patch: don't create empty .git directory when copying sources
Tim Cuthbertson <[email protected]>
| Newsgroups | gmane.comp.file-systems.zero-install.devel |
|---|---|
| Message-ID | <CAC-LLDiLg-Hj4R7H-shHfeQR+8p+Wc=qCuKt-KzWLJEctpOqzw@mail.gmail.com> |
This patch skips creating the entire .git directory when copying `src` -> `build`. Previously, the code copied the .git directory but then didn't copy anything else beneath it, which leads some build script to _think_ they're building a local .git workspace but then fail in weird ways when it turns out not to be a valid one. Cheers, - Tim. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ Zero-install-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/zero-install-devel
0001-don-t-create-empty-.git-directory-when-copying-sourc.patch
(text/x-diff, 821 B)
From 4de8d992123e8b2d294419bef2ba7033b5cc2efc Mon Sep 17 00:00:00 2001 From: Tim Cuthbertson <[email protected]> Date: Sat, 7 Feb 2015 22:27:35 +1100 Subject: [PATCH] don't create empty .git directory when copying sources --- build.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index 6f15ee1..8813474 100644 --- a/build.py +++ b/build.py @@ -646,7 +646,11 @@ def dup_src(fn): assert root.startswith(srcdir) reldir = root[len(srcdir):] - if reldir == '.git' or (reldir == 'build' and build_in_src) or \ + if '.git' in dirs: + print "dup-src: skipping", reldir + dirs.remove('.git') + + if (reldir == 'build' and build_in_src) or \ ('0compile.properties' in files and not build_in_src): print "dup-src: skipping", reldir dirs[:] = [] -- 2.1.0