[ostree] ostbuild: Fix --debug-shell
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] ostbuild: Fix --debug-shell
- Date: Thu, 9 Feb 2012 22:36:26 +0000 (UTC)
commit 351d243ccf33b0dd979d84a67e6288621dd84227
Author: Colin Walters <walters verbum org>
Date: Thu Feb 9 16:47:25 2012 -0500
ostbuild: Fix --debug-shell
We want to reuse an existing source tree.
src/ostbuild/pyostbuild/vcs.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/vcs.py b/src/ostbuild/pyostbuild/vcs.py
index a6d2470..adf947a 100755
--- a/src/ostbuild/pyostbuild/vcs.py
+++ b/src/ostbuild/pyostbuild/vcs.py
@@ -51,8 +51,11 @@ def get_vcs_checkout(mirrordir, keytype, uri, dest, branch, overwrite=True):
tmp_dest = dest + '.tmp'
if os.path.isdir(tmp_dest):
shutil.rmtree(tmp_dest)
- if os.path.isdir(dest) and overwrite:
- shutil.rmtree(dest)
+ if os.path.isdir(dest):
+ if overwrite:
+ shutil.rmtree(dest)
+ else:
+ return dest
if not os.path.isdir(tmp_dest):
run_sync(['git', 'clone', '-q',
'--no-checkout', module_mirror, tmp_dest])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]