From ec4097716af7fdedb8ede41a38ae92d87caa7473 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr@debian.org>
Date: Sat, 15 Jan 2011 21:41:07 +0100
Subject: [PATCH] make sure fpath3 and fpath2 have the same same content before
 replacing with a symlink

---
 dh_python2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dh_python2 b/dh_python2
index 776bf48..92dc2ef 100755
--- a/dh_python2
+++ b/dh_python2
@@ -280,7 +280,7 @@ def share_2x(dir1, dir2, dc=None):
                     os.rename(fpath1, fpath3)
                     relative_symlink(fpath3, fpath1)
                     relative_symlink(fpath3, fpath2)
-        else:
+        elif fcmp(fpath2, fpath3, shallow=False):
             os.remove(fpath2)
             relative_symlink(fpath3, fpath2)
     for dn, dc in common_dirs:
-- 
GitLab