[packagekit] packagekit: Branch 'master'
Richard Hughes
hughsient at kemper.freedesktop.org
Sat Sep 1 11:33:58 PDT 2007
TODO | 10 ++++++++++
client/pk-console.c | 2 +-
helpers/README | 35 ++++++++++++++++++++++++++++++++---
helpers/conary/Makefile.am | 2 +-
helpers/conary/conaryBackend.py | 2 +-
helpers/yum/Makefile.am | 2 +-
helpers/yum/get-depends.py | 2 +-
helpers/yum/packagekit.py | 4 ++--
helpers/yum/yumBackend.py | 2 +-
libpackagekit/pk-task-client.c | 8 ++++----
libpackagekit/pk-task-client.h | 2 +-
libpackagekit/pk-task-utils.c | 6 +++---
libpackagekit/pk-task-utils.h | 2 +-
src/pk-engine.c | 6 +++---
src/pk-engine.h | 2 +-
src/pk-interface.xml | 2 +-
src/pk-task-apt.cpp | 6 +++---
src/pk-task-box.c | 8 ++++----
src/pk-task-conary.c | 8 ++++----
src/pk-task-dummy.c | 6 +++---
src/pk-task-yum.c | 8 ++++----
src/pk-task.h | 2 +-
22 files changed, 83 insertions(+), 44 deletions(-)
New commits:
diff-tree 9e41de21cb9132d01bb009f176dc1deb7c7ee725 (from 714aaf72e46b20e85e7528aa5da749255cf108b7)
Author: Richard Hughes <richard at hughsie.com>
Date: Sat Sep 1 19:28:16 2007 +0100
Make GetDeps into GetDepends as we soon will be adding GetRequires soon
diff --git a/TODO b/TODO
index 0b231d9..caef870 100644
--- a/TODO
+++ b/TODO
@@ -13,6 +13,16 @@ Core:
* Add logging so we can see what was installed/removed and when
* Add "when installed" data into description
* Add "installed by 'Richard Hughes'" data into description
+* Add GetRequires
+* Add GetUpdateDetail(s=package_id)
+UpdateDetail(
+string url
+string restart_enum
+string updates
+string obsoletes
+string update_text
+}
+* Point to www.packagekit.org
Backends:
* Complete conary backend
diff --git a/client/pk-console.c b/client/pk-console.c
index 88d1084..a8413c0 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -225,7 +225,7 @@ pk_console_parse_multiple_commands (PkTa
goto out;
} else {
pk_task_client_set_sync (tclient, TRUE);
- pk_task_client_get_deps (tclient, details);
+ pk_task_client_get_depends (tclient, details);
remove = 3;
}
} else if (strcmp (value, "description") == 0) {
diff --git a/helpers/README b/helpers/README
index 409acc0..60bd88d 100644
--- a/helpers/README
+++ b/helpers/README
@@ -262,7 +262,7 @@ STDOUT package<tab>$status<tab>$package
This allows a summary to be presented after and during the transaction.
NOTES The installer should always install extra packages automatically
- as the use could call GetDeps prior to the intstall if a
+ as the use could call GetDepends prior to the intstall if a
confirmation is required in the UI.
========= Update Packages =========
@@ -336,9 +336,9 @@ STDOUT package<tab>$status<tab>$package
NOTE: as packages are installed then emit them to the screen.
This allows a summary to be presented after the transaction.
-========= Get Dependancies =========
+========= Get Depends =========
-FILENAME {backend}-get-deps.*
+FILENAME {backend}-get-depends.*
ARGUMENTS $package_id
package_id: The package ID name, e.g. openoffice;2.6.22;ppc64;fedora
@@ -359,6 +359,35 @@ STDOUT package<tab>$status<tab>$package
$package_id: The package ID name, e.g. openoffice;2.6.22;ppc64;fedora
$summary: The one line package summary.
+NOTE GetDepends should return packages that this package depends on.
+
+========= Get Requires =========
+
+FILENAME {backend}-get-requires.*
+
+ARGUMENTS $package_id
+ package_id: The package ID name, e.g. openoffice;2.6.22;ppc64;fedora
+
+STDERR percentage<tab>$value
+ value: Percentage complete of the entire transaction
+ notes: This is optional. Backends should send the signal
+ NoPercentageUpdates if these are not expected.
+
+STDERR error<tab>$enum<tab>description
+ enum: Enumerated type, e.g. "no-network", "package-id-invalid",
+ "not-supported" or "internal-error"
+ description: Long description or error
+ notes: Errors should only be send on fatal abortion.
+
+STDOUT package<tab>$status<tab>$package_id<tab>$summary
+ $status: Always "1"
+ $package_id: The package ID name, e.g. openoffice;2.6.22;ppc64;fedora
+ $summary: The one line package summary.
+
+NOTE GetRequires should return packages that depend on this package.
+ This is useful to know, as if $package_id is being removed, we
+ can warn the user what else would be removed.
+
========= Update System =========
FILENAME {backend}-update-system.*
diff --git a/helpers/conary/Makefile.am b/helpers/conary/Makefile.am
index a2b0308..6a8c40b 100644
--- a/helpers/conary/Makefile.am
+++ b/helpers/conary/Makefile.am
@@ -6,7 +6,7 @@ NULL =
dist_helper_DATA = \
search-name.py \
search-details.py \
- get-deps.py \
+ get-depends.py \
get-updates.py \
install.py \
refresh-cache.py \
diff --git a/helpers/conary/conaryBackend.py b/helpers/conary/conaryBackend.py
index f6ee825..3d1471f 100644
--- a/helpers/conary/conaryBackend.py
+++ b/helpers/conary/conaryBackend.py
@@ -152,7 +152,7 @@ class PackageKitConaryBackend(PackageKit
def search_details(self, opt, key):
pass
- def get_deps(self, package_id):
+ def get_depends(self, package_id):
pass
def update_system(self):
diff --git a/helpers/conary/get-depends.py b/helpers/conary/get-depends.py
new file mode 100755
index 0000000..339fca9
--- /dev/null
+++ b/helpers/conary/get-depends.py
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2007 Ken VanDine <ken at vandine.org>
+#
+# Licensed under the GNU General Public License Version 2
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+import sys
+
+sys.exit(0)
diff --git a/helpers/conary/get-deps.py b/helpers/conary/get-deps.py
deleted file mode 100755
index 339fca9..0000000
--- a/helpers/conary/get-deps.py
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2007 Ken VanDine <ken at vandine.org>
-#
-# Licensed under the GNU General Public License Version 2
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-import sys
-
-sys.exit(0)
diff --git a/helpers/yum/Makefile.am b/helpers/yum/Makefile.am
index fe6a94b..9cbbb47 100644
--- a/helpers/yum/Makefile.am
+++ b/helpers/yum/Makefile.am
@@ -8,7 +8,7 @@ dist_helper_DATA = \
search-details.py \
search-group.py \
search-file.py \
- get-deps.py \
+ get-depends.py \
get-updates.py \
get-description.py \
install.py \
diff --git a/helpers/yum/get-depends.py b/helpers/yum/get-depends.py
new file mode 100755
index 0000000..ce1100e
--- /dev/null
+++ b/helpers/yum/get-depends.py
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2007 Richard Hughes <richard at hughsie.com>
+#
+# Licensed under the GNU General Public License Version 2
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+import sys
+
+from yumBackend import PackageKitYumBackend
+package=sys.argv[1]
+backend = PackageKitYumBackend(sys.argv[1:])
+backend.get_depends(package)
+sys.exit(0)
diff --git a/helpers/yum/get-deps.py b/helpers/yum/get-deps.py
deleted file mode 100755
index caef349..0000000
--- a/helpers/yum/get-deps.py
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2007 Richard Hughes <richard at hughsie.com>
-#
-# Licensed under the GNU General Public License Version 2
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-import sys
-
-from yumBackend import PackageKitYumBackend
-package=sys.argv[1]
-backend = PackageKitYumBackend(sys.argv[1:])
-backend.get_deps(package)
-sys.exit(0)
diff --git a/helpers/yum/packagekit.py b/helpers/yum/packagekit.py
index 7824dab..a1592d1 100644
--- a/helpers/yum/packagekit.py
+++ b/helpers/yum/packagekit.py
@@ -170,9 +170,9 @@ class PackageKitBaseBackend:
self.error(ERROR_NOT_SUPPORTED,"This function is not implemented in this backend")
- def get_deps(self,package):
+ def get_depends(self,package):
'''
- Implement the {backend}-get-deps functionality
+ Implement the {backend}-get-depends functionality
Needed to be implemented in a sub class
'''
self.error(ERROR_NOT_SUPPORTED,"This function is not implemented in this backend")
diff --git a/helpers/yum/yumBackend.py b/helpers/yum/yumBackend.py
index 9140ae5..11f8c30 100644
--- a/helpers/yum/yumBackend.py
+++ b/helpers/yum/yumBackend.py
@@ -197,7 +197,7 @@ class PackageKitYumBackend(PackageKitBas
return None,False
- def get_deps(self,package):
+ def get_depends(self,package):
'''
Print a list of dependencies for a given package
'''
diff --git a/libpackagekit/pk-task-client.c b/libpackagekit/pk-task-client.c
index b423d64..af9c619 100644
--- a/libpackagekit/pk-task-client.c
+++ b/libpackagekit/pk-task-client.c
@@ -514,10 +514,10 @@ pk_task_client_search_file (PkTaskClient
}
/**
- * pk_task_client_get_deps:
+ * pk_task_client_get_depends:
**/
gboolean
-pk_task_client_get_deps (PkTaskClient *tclient, const gchar *package)
+pk_task_client_get_depends (PkTaskClient *tclient, const gchar *package)
{
gboolean ret;
GError *error;
@@ -532,7 +532,7 @@ pk_task_client_get_deps (PkTaskClient *t
}
error = NULL;
- ret = dbus_g_proxy_call (tclient->priv->proxy, "GetDeps", &error,
+ ret = dbus_g_proxy_call (tclient->priv->proxy, "GetDepends", &error,
G_TYPE_STRING, package,
G_TYPE_INVALID,
G_TYPE_UINT, &tclient->priv->job,
@@ -545,7 +545,7 @@ pk_task_client_get_deps (PkTaskClient *t
}
if (ret == FALSE) {
/* abort as the DBUS method failed */
- pk_warning ("GetDeps failed!");
+ pk_warning ("GetDepends failed!");
return FALSE;
}
/* only assign on success */
diff --git a/libpackagekit/pk-task-client.h b/libpackagekit/pk-task-client.h
index b588db0..ca242f8 100644
--- a/libpackagekit/pk-task-client.h
+++ b/libpackagekit/pk-task-client.h
@@ -82,7 +82,7 @@ gboolean pk_task_client_search_group (
gboolean pk_task_client_search_file (PkTaskClient *tclient,
const gchar *filter,
const gchar *search);
-gboolean pk_task_client_get_deps (PkTaskClient *tclient,
+gboolean pk_task_client_get_depends (PkTaskClient *tclient,
const gchar *package_id);
gboolean pk_task_client_get_description (PkTaskClient *tclient,
const gchar *package_id);
diff --git a/libpackagekit/pk-task-utils.c b/libpackagekit/pk-task-utils.c
index d7b6ea4..ac00be6 100644
--- a/libpackagekit/pk-task-utils.c
+++ b/libpackagekit/pk-task-utils.c
@@ -115,7 +115,7 @@ static PkTaskEnumMatch task_action[] = {
{PK_TASK_ACTION_SEARCH_DETAILS, "search-details"},
{PK_TASK_ACTION_SEARCH_GROUP, "search-group"},
{PK_TASK_ACTION_SEARCH_FILE, "search-file"},
- {PK_TASK_ACTION_GET_DEPS, "get-deps"},
+ {PK_TASK_ACTION_GET_DEPENDS, "get-depends"},
{PK_TASK_ACTION_GET_DESCRIPTION, "get-description"},
{0, NULL},
};
@@ -561,8 +561,8 @@ libst_task_utils (LibSelfTest *test)
/************************************************************/
libst_title (test, "test the action building (multiple)");
- text = pk_task_action_build (PK_TASK_ACTION_INSTALL, PK_TASK_ACTION_SEARCH_NAME, PK_TASK_ACTION_GET_DEPS, 0);
- if (strcmp (text, "install;search-name;get-deps") == 0) {
+ text = pk_task_action_build (PK_TASK_ACTION_INSTALL, PK_TASK_ACTION_SEARCH_NAME, PK_TASK_ACTION_GET_DEPENDS, 0);
+ if (strcmp (text, "install;search-name;get-depends") == 0) {
libst_success (test, NULL);
} else {
libst_failed (test, "incorrect multiple argument '%s'", text);
diff --git a/libpackagekit/pk-task-utils.h b/libpackagekit/pk-task-utils.h
index 6ae3864..39aecc0 100644
--- a/libpackagekit/pk-task-utils.h
+++ b/libpackagekit/pk-task-utils.h
@@ -103,7 +103,7 @@ typedef enum {
PK_TASK_ACTION_SEARCH_DETAILS,
PK_TASK_ACTION_SEARCH_GROUP,
PK_TASK_ACTION_SEARCH_FILE,
- PK_TASK_ACTION_GET_DEPS,
+ PK_TASK_ACTION_GET_DEPENDS,
PK_TASK_ACTION_GET_DESCRIPTION,
PK_TASK_ACTION_UNKNOWN
} PkTaskAction;
diff --git a/src/pk-engine.c b/src/pk-engine.c
index 3c49514..09c46f7 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -833,10 +833,10 @@ pk_engine_search_file (PkEngine *engine,
}
/**
- * pk_engine_get_deps:
+ * pk_engine_get_depends:
**/
gboolean
-pk_engine_get_deps (PkEngine *engine, const gchar *package_id,
+pk_engine_get_depends (PkEngine *engine, const gchar *package_id,
guint *job, GError **error)
{
gboolean ret;
@@ -855,7 +855,7 @@ pk_engine_get_deps (PkEngine *engine, co
/* create a new task and start it */
task = pk_engine_new_task (engine);
- ret = pk_task_get_deps (task, package_id);
+ ret = pk_task_get_depends (task, package_id);
if (ret == FALSE) {
g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
"operation not yet supported by backend");
diff --git a/src/pk-engine.h b/src/pk-engine.h
index cf78637..330fe63 100644
--- a/src/pk-engine.h
+++ b/src/pk-engine.h
@@ -93,7 +93,7 @@ gboolean pk_engine_search_file (PkEng
const gchar *search,
guint *job,
GError **error);
-gboolean pk_engine_get_deps (PkEngine *engine,
+gboolean pk_engine_get_depends (PkEngine *engine,
const gchar *package_id,
guint *job,
GError **error);
diff --git a/src/pk-interface.xml b/src/pk-interface.xml
index 31a56a0..efaf079 100644
--- a/src/pk-interface.xml
+++ b/src/pk-interface.xml
@@ -34,7 +34,7 @@
<arg type="s" name="search" direction="in"/>
<arg type="u" name="job" direction="out"/>
</method>
- <method name="GetDeps">
+ <method name="GetDepends">
<arg type="s" name="package_id" direction="in"/>
<arg type="u" name="job" direction="out"/>
</method>
diff --git a/src/pk-task-apt.cpp b/src/pk-task-apt.cpp
index a8fd1c4..30f141c 100644
--- a/src/pk-task-apt.cpp
+++ b/src/pk-task-apt.cpp
@@ -603,9 +603,9 @@ gboolean pk_task_search_file(PkTask * ta
}
/**
- * pk_task_get_deps:
+ * pk_task_get_depends:
**/
-gboolean pk_task_get_deps(PkTask * task, const gchar * package)
+gboolean pk_task_get_depends(PkTask * task, const gchar * package)
{
g_return_val_if_fail(task != NULL, FALSE);
g_return_val_if_fail(PK_IS_TASK(task), FALSE);
@@ -615,7 +615,7 @@ gboolean pk_task_get_deps(PkTask * task,
return FALSE;
}
- pk_task_not_implemented_yet (task, "GetDeps");
+ pk_task_not_implemented_yet (task, "GetDepends");
return FALSE;
}
diff --git a/src/pk-task-box.c b/src/pk-task-box.c
index 2ecd352..5856821 100644
--- a/src/pk-task-box.c
+++ b/src/pk-task-box.c
@@ -132,7 +132,7 @@ pk_task_get_actions (void)
/*PK_TASK_ACTION_SEARCH_DETAILS,*/
/*PK_TASK_ACTION_SEARCH_GROUP,*/
PK_TASK_ACTION_SEARCH_FILE,
- /*PK_TASK_ACTION_GET_DEPS,*/
+ /*PK_TASK_ACTION_GET_DEPENDS,*/
/*PK_TASK_ACTION_GET_DESCRIPTION,*/
0);
return actions;
@@ -351,10 +351,10 @@ pk_task_search_file (PkTask *task, const
}
/**
- * pk_task_get_deps:
+ * pk_task_get_depends:
**/
gboolean
-pk_task_get_deps (PkTask *task, const gchar *package_id)
+pk_task_get_depends (PkTask *task, const gchar *package_id)
{
g_return_val_if_fail (task != NULL, FALSE);
g_return_val_if_fail (PK_IS_TASK (task), FALSE);
@@ -364,7 +364,7 @@ pk_task_get_deps (PkTask *task, const gc
}
pk_task_set_job_role (task, PK_TASK_ROLE_QUERY, package_id);
- pk_task_not_implemented_yet (task, "GetDeps");
+ pk_task_not_implemented_yet (task, "GetDepends");
return TRUE;
}
diff --git a/src/pk-task-conary.c b/src/pk-task-conary.c
index cbd73c3..666fa3c 100644
--- a/src/pk-task-conary.c
+++ b/src/pk-task-conary.c
@@ -75,7 +75,7 @@ pk_task_get_actions (void)
/* PK_TASK_ACTION_SEARCH_DETAILS,*/
/* PK_TASK_ACTION_SEARCH_GROUP,*/
/* PK_TASK_ACTION_SEARCH_FILE,*/
-/* PK_TASK_ACTION_GET_DEPS,*/
+/* PK_TASK_ACTION_GET_DEPENDS,*/
/* PK_TASK_ACTION_GET_DESCRIPTION,*/
0);
return actions;
@@ -216,10 +216,10 @@ pk_task_search_file (PkTask *task, const
}
/**
- * pk_task_get_deps:
+ * pk_task_get_depends:
**/
gboolean
-pk_task_get_deps (PkTask *task, const gchar *package_id)
+pk_task_get_depends (PkTask *task, const gchar *package_id)
{
g_return_val_if_fail (task != NULL, FALSE);
g_return_val_if_fail (PK_IS_TASK (task), FALSE);
@@ -229,7 +229,7 @@ pk_task_get_deps (PkTask *task, const gc
}
pk_task_set_job_role (task, PK_TASK_ROLE_QUERY, package_id);
- pk_task_not_implemented_yet (task, "GetDeps");
+ pk_task_not_implemented_yet (task, "GetDepends");
return TRUE;
}
diff --git a/src/pk-task-dummy.c b/src/pk-task-dummy.c
index 7c15606..4867646 100644
--- a/src/pk-task-dummy.c
+++ b/src/pk-task-dummy.c
@@ -70,7 +70,7 @@ pk_task_get_actions (void)
PK_TASK_ACTION_SEARCH_DETAILS,
PK_TASK_ACTION_SEARCH_GROUP,
PK_TASK_ACTION_SEARCH_FILE,
- PK_TASK_ACTION_GET_DEPS,
+ PK_TASK_ACTION_GET_DEPENDS,
PK_TASK_ACTION_GET_DESCRIPTION,
0);
return actions;
@@ -233,10 +233,10 @@ pk_task_search_file (PkTask *task, const
}
/**
- * pk_task_get_deps:
+ * pk_task_get_depends:
**/
gboolean
-pk_task_get_deps (PkTask *task, const gchar *package_id)
+pk_task_get_depends (PkTask *task, const gchar *package_id)
{
g_return_val_if_fail (task != NULL, FALSE);
g_return_val_if_fail (PK_IS_TASK (task), FALSE);
diff --git a/src/pk-task-yum.c b/src/pk-task-yum.c
index 6328d4b..fdc5deb 100644
--- a/src/pk-task-yum.c
+++ b/src/pk-task-yum.c
@@ -74,7 +74,7 @@ pk_task_get_actions (void)
PK_TASK_ACTION_SEARCH_DETAILS,
PK_TASK_ACTION_SEARCH_GROUP,
PK_TASK_ACTION_SEARCH_FILE,
- PK_TASK_ACTION_GET_DEPS,
+ PK_TASK_ACTION_GET_DEPENDS,
PK_TASK_ACTION_GET_DESCRIPTION,
0);
return actions;
@@ -247,10 +247,10 @@ pk_task_search_file (PkTask *task, const
}
/**
- * pk_task_get_deps:
+ * pk_task_get_depends:
**/
gboolean
-pk_task_get_deps (PkTask *task, const gchar *package_id)
+pk_task_get_depends (PkTask *task, const gchar *package_id)
{
g_return_val_if_fail (task != NULL, FALSE);
g_return_val_if_fail (PK_IS_TASK (task), FALSE);
@@ -263,7 +263,7 @@ pk_task_get_deps (PkTask *task, const gc
pk_task_allow_interrupt (task, TRUE);
pk_task_set_job_role (task, PK_TASK_ROLE_QUERY, package_id);
- pk_task_spawn_helper (task, "get-deps.py", package_id, NULL);
+ pk_task_spawn_helper (task, "get-depends.py", package_id, NULL);
return TRUE;
}
diff --git a/src/pk-task.h b/src/pk-task.h
index a7c77cf..6ed13d9 100644
--- a/src/pk-task.h
+++ b/src/pk-task.h
@@ -90,7 +90,7 @@ gboolean pk_task_search_group (PkTask
gboolean pk_task_search_file (PkTask *task,
const gchar *filter,
const gchar *search);
-gboolean pk_task_get_deps (PkTask *task,
+gboolean pk_task_get_depends (PkTask *task,
const gchar *package);
gboolean pk_task_remove_package (PkTask *task,
const gchar *package,
More information about the PackageKit
mailing list