summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-08-31 15:34:04 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-08-31 15:34:04 +0200
commit3ec4a3676de540d05286f3bdc41f00a799244f3b (patch)
tree460e9e05ba521082d5f901fdd1452cbc9bf9c329 /python
parent8cd715add7f85fb67cc30e42449d83a2ef7cf0bd (diff)
parent96476d01e881f52d53a70f1ae700594a0f321056 (diff)
downloadpython-apt-3ec4a3676de540d05286f3bdc41f00a799244f3b.tar.gz
* add "provides" property to the apt.Version objects
* apt/debfile.py: - fix error when reading binary content and add regresion test
Diffstat (limited to 'python')
-rw-r--r--python/acquire.cc6
-rw-r--r--python/cache.cc10
2 files changed, 8 insertions, 8 deletions
diff --git a/python/acquire.cc b/python/acquire.cc
index 6f9a1412..ab90bbdd 100644
--- a/python/acquire.cc
+++ b/python/acquire.cc
@@ -259,15 +259,15 @@ static PyMethodDef PkgAcquireMethods[] = {
#define fetcher (GetCpp<pkgAcquire*>(Self))
static PyObject *PkgAcquireGetTotalNeeded(PyObject *Self,void*)
{
- return Py_BuildValue("d", fetcher->TotalNeeded());
+ return Py_BuildValue("L", fetcher->TotalNeeded());
}
static PyObject *PkgAcquireGetFetchNeeded(PyObject *Self,void*)
{
- return Py_BuildValue("d", fetcher->FetchNeeded());
+ return Py_BuildValue("L", fetcher->FetchNeeded());
}
static PyObject *PkgAcquireGetPartialPresent(PyObject *Self,void*)
{
- return Py_BuildValue("d", fetcher->PartialPresent());
+ return Py_BuildValue("L", fetcher->PartialPresent());
}
#undef fetcher
diff --git a/python/cache.cc b/python/cache.cc
index e31f6a65..e87d73d4 100644
--- a/python/cache.cc
+++ b/python/cache.cc
@@ -573,9 +573,8 @@ static PyGetSetDef PackageGetSet[] = {
{"rev_depends_list",PackageGetRevDependsList,0,
"An apt_pkg.DependencyList object of all reverse dependencies."},
{"provides_list",PackageGetProvidesList,0,
- "A list of all packages providing this package. The list contains\n"
- "tuples in the format (providesname, providesver, version)\n"
- "where 'version' is an apt_pkg.Version object."},
+ "Ignore it, it does nothing. You want to use\n"
+ "apt_pkg.Version.provides_list instead."},
{"selected_state",PackageGetSelectedState,0,
"The state of the selection, which can be compared against the constants\n"
"SELSTATE_DEINSTALL, SELSTATE_HOLD, SELSTATE_INSTALL, SELSTATE_PURGE,\n"
@@ -979,8 +978,9 @@ static PyGetSetDef VersionGetSet[] = {
{"priority_str",VersionGetPriorityStr,0,
"The priority of the package, as a string."},
{"provides_list",VersionGetProvidesList,0,
- "A list of all packages provided by this version. See\n"
- "Package.provides_list for a description of the format."},
+ "A list of all packages provided by this version. The list contains\n"
+ "tuples in the format (providesname, providesver, version)\n"
+ "where 'version' is an apt_pkg.Version object."},
{"section",VersionGetSection,0,
"The section of this package version."},
{"size",VersionGetSize,0,