[bug-notifications] [pkgutil 0004045]: RFE: Override configuration parameters on the commandline (via --param?)

Mantis Bug Tracker noreply at opencsw.org
Mon Mar 1 16:30:00 CET 2010


A NOTE has been added to this issue. 
====================================================================== 
http://www.opencsw.org/mantis/view.php?id=4045 
====================================================================== 
Reported By:                skayser
Assigned To:                bonivart
====================================================================== 
Project:                    pkgutil
Issue ID:                   4045
Category:                   regular use
Reproducibility:            N/A
Severity:                   feature
Priority:                   low
Status:                     assigned
====================================================================== 
Date Submitted:             2009-11-17 13:30 CET
Last Modified:              2010-03-01 16:30 CET
====================================================================== 
Summary:                    RFE: Override configuration parameters on the
commandline (via --param?)
Description: 
For testing and various other purposes i sometimes fiddle with
configuration settings in pkgutil.conf. How about introducing a command
line option to do this on-the-fly?

A somewhat limited use case example to illustrate the RFE:

$ pkgutil -V | grep noncsw
noncsw          true (default: false)

Now to compare only CSW cups packages i would do

$ pkgutil -c cups | grep CSW

With --param i could also do 

$ pkgutil --param noncsw=false -c cups

and have pkgutil filter the pkg list right away. I know, it is longer to
type, but the general ability to change and test settings on the fly feels
helpful to me. I don't know whether this can be easily implemented for all
possible parameters (also future ones) so that this doesn't result in more
work when you implement additional parameters. Wishlist item.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
has duplicate       0004302 provide a command-line switch for use_g...
====================================================================== 

---------------------------------------------------------------------- 
 (0007554) bonivart (manager) - 2010-03-01 16:29
 http://www.opencsw.org/mantis/view.php?id=4045#c7554 
---------------------------------------------------------------------- 
r205 contains this feature. Actually adding this option is a good way to
hinder option creep since it makes configuration file options accessible
from the command line, otherwise people would ask for equivalent command
line options all the time, now I can refer them to -p. :-)

Due to how the parsing works these two types are the ways to specify this
option (multiples are allowed):

# pkgutil -p use_gpg:false --param=use_md5:false -V

The colon separator is the same as is used when specifying arch and
release for the --target option. Options that contain space separated items
must be quoted:

# pkgutil -p exclude_pattern:"foo bar" -V

Another way of doing what you want here is to have a custom pkgutil.conf
file that you specify with --config. I'm implementing this anyway since
it's generic functionality. I have another similar request from
http://www.opencsw.org/mantis/view.php?id=4302 as
well, he accepted this generic solution to his specific request.



More information about the bug-notifications mailing list