From 5f64fd8fd1e56a2afcde4889c9ed4ca45e209afa Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Wed, 8 Oct 2008 14:58:56 -1000 Subject: [PATCH] Do not make symlinks if dest files exist. --- src/pylorax/instroot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pylorax/instroot.py b/src/pylorax/instroot.py index 8bb4034c..f7101076 100644 --- a/src/pylorax/instroot.py +++ b/src/pylorax/instroot.py @@ -310,8 +310,9 @@ def scrubInstRoot(destdir=None, libdir='lib', arch=None): # fix up some links for man page related stuff for file in ['nroff', 'groff', 'iconv', 'geqn', 'gtbl', 'gpic', 'grefer']: src = os.path.join('mnt', 'sysimage', 'usr', 'bin', file) - dest = os.path.join(destdir, 'usr', 'bin', file) - os.symlink(src, dest) + dst = os.path.join(destdir, 'usr', 'bin', file) + if not os.path.isfile(dst): + os.symlink(src, dst) # install anaconda stub programs as instroot programs for subdir in ['lib', 'firmware']: