summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2007-09-02 22:55:36 +0100
committerRichard Hughes <richard@hughsie.com>2007-09-02 22:55:36 +0100
commit9747b54cd549e6b7c0d495f37ddf5d2fceab1a3f (patch)
tree6866613903f65419a78d79f0dbad818a6b29b1b2 /client
parenta1415982a9e6b698a3fc6deb3f85a73b00409188 (diff)
Add the method GetRequires as discussed on the mailing list
Diffstat (limited to 'client')
-rw-r--r--client/pk-console.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/client/pk-console.c b/client/pk-console.c
index a8413c0d..23d4856d 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -121,7 +121,8 @@ pk_console_usage (const gchar *error)
g_print (" pkcon [sync] [verbose] force-refresh\n");
g_print (" pkcon [sync] [verbose] update-system\n");
g_print (" pkcon [sync] [verbose] get updates\n");
- g_print (" pkcon [sync] [verbose] get deps <package_id>\n");
+ g_print (" pkcon [sync] [verbose] get depends <package_id>\n");
+ g_print (" pkcon [sync] [verbose] get requires <package_id>\n");
g_print (" pkcon [sync] [verbose] get description <package_id>\n");
g_print ("\n");
g_print (" package_id is typically gimp;2:2.4.0-0.rc1.1.fc8;i386;development\n");
@@ -218,7 +219,7 @@ pk_console_parse_multiple_commands (PkTaskClient *tclient, GPtrArray *array)
pk_console_usage ("you need to specify a get type");
remove = 1;
goto out;
- } else if (strcmp (value, "deps") == 0) {
+ } else if (strcmp (value, "depends") == 0) {
if (details == NULL) {
pk_console_usage ("you need to specify a search term");
remove = 2;
@@ -228,6 +229,16 @@ pk_console_parse_multiple_commands (PkTaskClient *tclient, GPtrArray *array)
pk_task_client_get_depends (tclient, details);
remove = 3;
}
+ } else if (strcmp (value, "requires") == 0) {
+ if (details == NULL) {
+ pk_console_usage ("you need to specify a search term");
+ remove = 2;
+ goto out;
+ } else {
+ pk_task_client_set_sync (tclient, TRUE);
+ pk_task_client_get_requires (tclient, details);
+ remove = 3;
+ }
} else if (strcmp (value, "description") == 0) {
if (details == NULL) {
pk_console_usage ("you need to specify a package to find the description for");