[packagekit] packagekit: Branch 'master' - 4 commits

Richard Hughes hughsient at kemper.freedesktop.org
Tue Oct 23 03:52:05 PDT 2007


 backends/yum/helpers/Makefile.am |    2 ++
 client/pk-console.c              |   10 ++++++++--
 python/packagekit/backend.py     |    2 +-
 src/pk-backend.c                 |   15 +++++++++++++++
 4 files changed, 26 insertions(+), 3 deletions(-)

New commits:
commit baa0c9fc9bbfede9bc8923e27ac58fbb1b5e935c
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Oct 23 11:48:12 2007 +0100

    add support for repo-detail for spawned backends

diff --git a/src/pk-backend.c b/src/pk-backend.c
index fc16ccf..250aba2 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -304,6 +304,21 @@ pk_backend_parse_common_output (PkBackend *backend, const gchar *line)
 						group, sections[4], sections[5],
 						package_size, sections[7]);
 		}
+	} else if (strcmp (command, "repo-detail") == 0) {
+		if (size != 4) {
+			g_warning ("invalid command '%s'", command);
+			ret = FALSE;
+			goto out;
+		}
+		if (strcmp (sections[3], "true") == 0) {
+			pk_backend_repo_detail (backend, sections[1], sections[2], TRUE);
+		} else if (strcmp (sections[3], "false") == 0) {
+			pk_backend_repo_detail (backend, sections[1], sections[2], FALSE);
+		} else {
+			g_warning ("invalid qualifier '%s'", sections[3]);
+			ret = FALSE;
+			goto out;
+		}
 	} else {
 		pk_warning ("invalid command '%s'", command);
 	}
commit 295766400f16784e25dcd6be41ff7f1f35ba0c92
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Oct 23 11:47:33 2007 +0100

    repo-detail should be on stdout, not stderr

diff --git a/python/packagekit/backend.py b/python/packagekit/backend.py
index 8dcce69..73b2545 100644
--- a/python/packagekit/backend.py
+++ b/python/packagekit/backend.py
@@ -140,7 +140,7 @@ class PackageKitBaseBackend:
         @param repoid: The repo id tag
         @param state: false is repo is disabled else true.
         '''
-        print >> sys.stderr,"repo-detail\t%s\t%s\t%s" % (repoid,name,state)
+        print >> sys.stdout,"repo-detail\t%s\t%s\t%s" % (repoid,name,state)
 
     def data(self,data):
         '''
commit 9708600a6d33e7491a0400ff06bc5f88b927c700
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Oct 23 11:47:00 2007 +0100

    make the pkcon get-repo-list output better

diff --git a/client/pk-console.c b/client/pk-console.c
index 6862286..d6f77e8 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -165,8 +165,14 @@ static void
 pk_console_repo_detail_cb (PkClient *client, const gchar *repo_id,
 			   const gchar *description, gboolean enabled, gpointer data)
 {
-	g_print ("Repository detail for %s\n", repo_id);
-	g_print ("  %i, %s\n", enabled, description);
+	gchar *repo;
+	repo = pk_console_pad_string (repo_id, 28, NULL);
+	if (enabled == TRUE) {
+		g_print ("  enabled   %s %s\n", repo, description);
+	} else {
+		g_print ("  disabled  %s %s\n", repo, description);
+	}
+	g_free (repo);
 }
 
 /**
commit 9fa7d4c1bfb8f385f4a62b1cbe652484aa6de7ca
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Oct 23 11:24:17 2007 +0100

    dist the repo files for the yum backend

diff --git a/backends/yum/helpers/Makefile.am b/backends/yum/helpers/Makefile.am
index 117f242..f38d74c 100644
--- a/backends/yum/helpers/Makefile.am
+++ b/backends/yum/helpers/Makefile.am
@@ -12,6 +12,8 @@ dist_helper_DATA = 			\
 	get-requires.py			\
 	get-updates.py			\
 	get-description.py		\
+	get-repo-list.py		\
+	repo-enable.py			\
 	install.py			\
 	remove.py			\
 	resolve.py			\



More information about the PackageKit mailing list