Just some thoughts on this patch, and repoquery itself:

On Thu, 17 May 2007 15:12:24 -0400 (EDT), Seth Vidal wrote:
> Update of /home/groups/yum/cvs/yum-utils
> In directory login1.linux.duke.edu:/tmp/cvs-serv14210
> 
> Modified Files:
>       repoquery.py 
> Log Message:
> if the user doesn't specify -c then just use whatever the default is for the
> yum version they have installed. Don't default to /etc/yum.conf anymore.
> 
> 
> 
> Index: repoquery.py
> ===================================================================
> RCS file: /home/groups/yum/cvs/yum-utils/repoquery.py,v
> retrieving revision 1.43
> retrieving revision 1.44
> diff -u -r1.43 -r1.44
> --- repoquery.py      19 Mar 2007 10:35:59 -0000      1.43
> +++ repoquery.py      17 May 2007 19:12:22 -0000      1.44
> @@ -565,7 +565,7 @@
>      parser.add_option("--querytags", default=0, action="store_true",
>                        help="list available tags in queryformat queries")
>      parser.add_option("-c", dest="conffile", action="store",
> -                      default='/etc/yum.conf', help="config file location")
> +                      default=None, help="config file location")

If the default is None, you don't need to specify it.

>  
>      (opts, regexs) = parser.parse_args()
>      if opts.version:
> @@ -639,7 +639,11 @@
>          pkgops.append("queryformat")
>  
>      repoq = YumBaseQuery(pkgops, sackops, opts)
> -    repoq.doConfigSetup(fn=opts.conffile, init_plugins=False)
> +    if opts.conffile:
> +        repoq.doConfigSetup(fn=opts.conffile, init_plugins=False)
> +    else:
> +        repoq.doConfigSetup(init_plugins=False)
> +        
>      # Show what is going on, if --quiet is not set.
>      if not opts.quiet:
>          repoq.repos.setProgressBar(TextMeter(fo=sys.stdout))

Shouldn't repoquery initialize core plugins? That would be nice for any rhel
5/RHN users.

-James

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to