[jhbuild] Remove broken in-the-way links when re-installing (GNOME bug 684205)



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]