summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael E Brown <michael_e_brown@dell.com>2007-06-14 11:53:57 -0500
committerMichael E Brown <michael_e_brown@dell.com>2007-06-14 11:53:57 -0500
commit06cc03463a6e71aa781d280e1e8620146dd46841 (patch)
tree568fd943f7bcc32d85791e1f9915a4dec6998acf
parent6533774ebda67addfb6e701246f3a96c5e62bcd9 (diff)
no need to recreate yum.conf symlink if it already exists
-rw-r--r--mock.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/mock.py b/mock.py
index 1a178fc..9a6bdac 100644
--- a/mock.py
+++ b/mock.py
@@ -717,10 +717,8 @@ class Root:
yumdir = os.path.join(self.rootdir, 'etc', 'yum')
self._ensure_dir(yumdir)
yumlink = os.path.join(yumdir, 'yum.conf')
- if os.path.exists(yumlink):
- cmd = '%s -rf %s' % (self.config['rm'], yumlink)
- (retval, output) = self.do(cmd)
- os.symlink('../yum.conf', yumlink)
+ if not os.path.exists(yumlink):
+ os.symlink('../yum.conf', yumlink)
if self.config.setdefault('use_host_resolv', True) == True:
resolvdir = os.path.join(self.rootdir, 'etc')