[packagekit] [RFC PATCH] Implement GOption option parsing for pkcon and pkmon

James Bowes jbowes at dangerouslyinc.com
Mon Oct 15 06:29:06 PDT 2007


Hi all:

The three attached patches implement goption argument parsing for
pkcon and pkmon, adding --verbose and --version.

An overview of the patches:

0001 - GOption parsing for pkmon. Pretty straightforward.
0002 - set a GError for parse_multiple_options rather than showing
usage directly. This
           helps displaying the usage from goption in main() for the next patch.
0003 - GOption parsing for pkmon. Note that the verbose and debug subcommands
           are replaced by the -v/--verbose option.

$ git diff --stat master
 client/pk-console.c |  140 +++++++++++++++++++++++++++++---------------------
 client/pk-monitor.c |   25 +++++++++-
 2 files changed, 105 insertions(+), 60 deletions(-)

Comments/flames appreciated.

-James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-pkmon-Use-GOption-to-implement-verbose-and-vers.patch
Type: text/x-patch
Size: 1522 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/packagekit/attachments/20071015/85cc6688/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-pkcon-change-parse_multiple_options-to-use-a-GError.patch
Type: text/x-patch
Size: 7351 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/packagekit/attachments/20071015/85cc6688/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-pkcon-Use-GOption-for-verbose-version-and-usag.patch
Type: text/x-patch
Size: 4863 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/packagekit/attachments/20071015/85cc6688/attachment-0002.bin 


More information about the PackageKit mailing list