Skip to content

Commit

Permalink
make /etc/yum.conf symlink to /etc/yum/yum.conf
Browse files Browse the repository at this point in the history
Because Amazon Linux prefers /etc/yum.conf which is just touched and empty, while RHEL prefers /etc/yum/yum.conf
and ignore the touched /etc/yum.conf when the former exists.

This resolve issue #82
  • Loading branch information
xsuchy committed Jun 8, 2017
1 parent 6659439 commit 294fd75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion py/mockbuild/buildroot.py
Expand Up @@ -509,10 +509,13 @@ def _setup_devices(self):
def _setup_files(self):
# self.root_log.debug('touch required files')
for item in [self.make_chroot_path('etc', 'fstab'),
self.make_chroot_path('etc', 'yum.conf'),
self.make_chroot_path('etc', 'yum', 'yum.conf'),
self.make_chroot_path('etc', 'dnf.conf'),
self.make_chroot_path('var', 'log', 'yum.log')]:
util.touch(item)
short_yum_confpath = self.make_chroot_path('etc', 'yum.conf')
if not os.path.exists(short_yum_confpath):
os.symlink("yum/yum.conf", short_yum_confpath)

@traceLog()
def _setup_files_postinstall(self):
Expand Down

0 comments on commit 294fd75

Please sign in to comment.