Advertisement
Guest User

Untitled

a guest
Jan 30th, 2012
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. diff --git a/cli.py b/cli.py
  2. --- a/cli.py 2011-01-11 11:05:35.000000000 -0500
  3. +++ b/cli.py 2012-01-30 06:26:06.803764007 -0500
  4. @@ -1531,13 +1531,14 @@ class YumOptionParser(OptionParser):
  5. self._checkAbsInstallRoot(opts)
  6. # If the conf file is inside the installroot - use that.
  7. # otherwise look for it in the normal root
  8. + if opts.conffile==None:
  9. + opts.conffile = '/etc/yum/yum.conf'
  10. + if opts.installroot:
  11. + if os.access(opts.installroot+opts.conffile, os.R_OK):
  12. + opts.conffile = opts.installroot+opts.conffile
  13. + elif os.access(opts.installroot+'/etc/yum.conf', os.R_OK):
  14. + opts.conffile = opts.installroot+'/etc/yum.conf'
  15. if opts.installroot:
  16. - if os.access(opts.installroot+'/'+opts.conffile, os.R_OK):
  17. - opts.conffile = opts.installroot+'/'+opts.conffile
  18. - elif opts.conffile == '/etc/yum/yum.conf':
  19. - # check if /installroot/etc/yum.conf exists.
  20. - if os.access(opts.installroot+'/etc/yum.conf', os.R_OK):
  21. - opts.conffile = opts.installroot+'/etc/yum.conf'
  22. root=opts.installroot
  23. else:
  24. root = '/'
  25. @@ -1394,7 +1395,6 @@ class YumOptionParser(OptionParser):
  26. action="store_true",
  27. help=_("run entirely from system cache, don't update cache"))
  28. group.add_option("-c", "--config", dest="conffile",
  29. - default='/etc/yum/yum.conf',
  30. help=_("config file location"), metavar='[config file]')
  31. group.add_option("-R", "--randomwait", dest="sleeptime", type='int',
  32. default=None,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement