[jhbuild] Remove broken in-the-way links when re-installing (GNOME bug 684205)
- From: Craig Keogh <cskeogh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] Remove broken in-the-way links when re-installing (GNOME bug 684205)
- Date: Mon, 17 Sep 2012 12:17:23 +0000 (UTC)
commit d9bd21c0d6b7d399bc886e70f2f596a379af7722
Author: Craig Keogh <cskeogh adam com au>
Date: Mon Sep 17 21:46:07 2012 +0930
Remove broken in-the-way links when re-installing (GNOME bug 684205)
jhbuild/modtypes/__init__.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/jhbuild/modtypes/__init__.py b/jhbuild/modtypes/__init__.py
index db54a88..69e560f 100644
--- a/jhbuild/modtypes/__init__.py
+++ b/jhbuild/modtypes/__init__.py
@@ -254,9 +254,8 @@ them into the prefix."""
dest_path = src_path[len(installroot):]
if os.path.islink(src_path):
linkto = os.readlink(src_path)
- if os.path.exists(dest_path):
- if os.path.islink(dest_path) or os.path.isfile(dest_path):
- os.unlink(dest_path)
+ if os.path.islink(dest_path) or os.path.isfile(dest_path):
+ os.unlink(dest_path)
os.symlink(linkto, dest_path)
os.unlink(src_path)
num_copied += 1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]