[PATCH] trivial: check for DownloadPackages in pkgenpack as well as GetDepends

Richard Hughes richard at hughsie.com
Thu Jan 29 01:26:38 PST 2009


---
 client/pk-generate-pack.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/client/pk-generate-pack.c b/client/pk-generate-pack.c
index 0a1070e..775cd48 100644
--- a/client/pk-generate-pack.c
+++ b/client/pk-generate-pack.c
@@ -255,11 +255,18 @@ main (int argc, char *argv[])
 	if (directory == NULL)
 		directory = g_get_current_dir ();
 
-	/* are we dumb and can't check for depends? */
+	/* are we dumb and can't do some actions */
 	control = pk_control_new ();
 	roles = pk_control_get_actions (control, NULL);
 	if (!pk_bitfield_contain (roles, PK_ROLE_ENUM_GET_DEPENDS)) {
-		g_print ("Please use a backend that supports GetDepends!\n");
+		/* TRANSLATORS: This is when the backend doesn't have the capability to get-depends */
+		g_print ("%s (GetDepends)\n", _("The package manager cannot perform this type of operation."));
+		retval = 1;
+		goto out;
+	}
+	if (!pk_bitfield_contain (roles, PK_ROLE_ENUM_DOWNLOAD_PACKAGES)) {
+		/* TRANSLATORS: This is when the backend doesn't have the capability to download */
+		g_print ("%s (DownloadPackage)\n", _("The package manager cannot perform this type of operation."));
 		retval = 1;
 		goto out;
 	}
-- 
1.6.0.6


--=-lV+SxmnKFyrvv1DKBoIC
Content-Disposition: attachment; filename*0=0006-feature-allow-the-user-to-specify-a-complete-output.patc; filename*1=h
Content-Type: text/x-patch; name="0006-feature-allow-the-user-to-specify-a-complete-output.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



More information about the PackageKit mailing list