Public feed
#528803
def getRoot(self,opts):
# If the conf file is inside the installroot - use that.
# otherwise look for it in the normal root
+ if opts.conffile==None:
+ opts.conffile = '/etc/yum/yum.conf'
+ if opts.installroot:
+ if os.access(opts.installroot+opts.conffile, os.R_OK):
+ opts.conffile = opts.installroot+opts.conffile
+ elif os.access(opts.installroot+'/etc/yum.conf', os.R_OK):
+ opts.conffile = opts.installroot+'/etc/yum.conf'
if opts.installroot:
- if os.access(opts.installroot+'/'+opts.conffile, os.R_OK):
- opts.conffile = opts.installroot+'/'+opts.conffile
- elif opts.conffile == '/etc/yum/yum.conf':
- # check if /installroot/etc/yum.conf exists.
- if os.access(opts.installroot+'/etc/yum.conf', os.R_OK):
- opts.conffile = opts.installroot+'/etc/yum.conf'
root=opts.installroot
else:
root = '/'