Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/cli.py b/cli.py
- --- a/cli.py 2011-01-11 11:05:35.000000000 -0500
- +++ b/cli.py 2012-01-30 06:26:06.803764007 -0500
- @@ -1531,13 +1531,14 @@ class YumOptionParser(OptionParser):
- self._checkAbsInstallRoot(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 = '/'
- @@ -1394,7 +1395,6 @@ class YumOptionParser(OptionParser):
- action="store_true",
- help=_("run entirely from system cache, don't update cache"))
- group.add_option("-c", "--config", dest="conffile",
- - default='/etc/yum/yum.conf',
- help=_("config file location"), metavar='[config file]')
- group.add_option("-R", "--randomwait", dest="sleeptime", type='int',
- default=None,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement