summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-08-19 16:39:57 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-08-19 16:39:57 +0200
commitee7b1ef76f58e8dd3a744af98007c4ab8b5ab6d2 (patch)
treeac6b1716b26be9d0884d3577d0809a3e1a947592
parent3774f875be6bbe97b98032b72f3933ed151b35a8 (diff)
downloadpython-apt-ee7b1ef76f58e8dd3a744af98007c4ab8b5ab6d2.tar.gz
* apt/cache.py, python/cache.cc:
- add optional pulseIntevall option to "update()" * po/python-apt.pot: - refreshed
-rw-r--r--apt/cache.py4
-rw-r--r--debian/changelog4
-rw-r--r--debian/control2
-rw-r--r--po/python-apt.pot12
-rw-r--r--python/cache.cc5
5 files changed, 16 insertions, 11 deletions
diff --git a/apt/cache.py b/apt/cache.py
index c1e2428c..bb396d59 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -270,7 +270,7 @@ class Cache(object):
providers.append(pkg)
return providers
- def update(self, fetchProgress=None):
+ def update(self, fetchProgress=None, pulseInterval=0):
" run the equivalent of apt-get update "
lockfile = apt_pkg.Config.FindDir("Dir::State::Lists") + "lock"
lock = apt_pkg.GetLock(lockfile)
@@ -280,7 +280,7 @@ class Cache(object):
try:
if fetchProgress is None:
fetchProgress = apt.progress.FetchProgress()
- return self._cache.Update(fetchProgress, self._list)
+ return self._cache.Update(fetchProgress, self._list, pulseInterval)
finally:
os.close(lock)
diff --git a/debian/changelog b/debian/changelog
index 03f0ad5b..3f22d113 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,10 @@ python-apt (0.7.12.2) UNRELEASED; urgency=low
[ Michael Vogt ]
* apt/package.py:
- add "recommends" property
+ * apt/cache.py, python/cache.cc:
+ - add optional pulseIntevall option to "update()"
+ * po/python-apt.pot:
+ - refreshed
[ Julian Andres Klode ]
* apt/package.py:
diff --git a/debian/control b/debian/control
index 7cd6f81d..ab2d343d 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Standards-Version: 3.8.2
XS-Python-Version: all
Build-Depends: apt-utils,
debhelper (>= 7.3.5),
- libapt-pkg-dev (>= 0.7.22~),
+ libapt-pkg-dev (>= 0.7.21),
python-all-dbg,
python-all-dev,
python-central (>= 0.5),
diff --git a/po/python-apt.pot b/po/python-apt.pot
index f904a0c5..a7229893 100644
--- a/po/python-apt.pot
+++ b/po/python-apt.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-24 13:56+0200\n"
+"POT-Creation-Date: 2009-08-19 16:33+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -369,16 +369,16 @@ msgstr ""
msgid "Complete"
msgstr ""
-#: ../apt/package.py:278
+#: ../apt/package.py:315
#, python-format
msgid "Invalid unicode in description for '%s' (%s). Please report."
msgstr ""
-#: ../apt/package.py:747 ../apt/package.py:851
+#: ../apt/package.py:878 ../apt/package.py:982
msgid "The list of changes is not available"
msgstr ""
-#: ../apt/package.py:855
+#: ../apt/package.py:986
#, python-format
msgid ""
"The list of changes is not available yet.\n"
@@ -387,7 +387,7 @@ msgid ""
"until the changes become available or try again later."
msgstr ""
-#: ../apt/package.py:861
+#: ../apt/package.py:992
msgid ""
"Failed to download the list of changes. \n"
"Please check your Internet connection."
@@ -400,7 +400,7 @@ msgstr ""
#: ../apt/debfile.py:81
#, python-format
-msgid "List of files for '%s'could not be read"
+msgid "List of files for '%s' could not be read"
msgstr ""
#: ../apt/debfile.py:149
diff --git a/python/cache.cc b/python/cache.cc
index c7e5e76e..f0da8511 100644
--- a/python/cache.cc
+++ b/python/cache.cc
@@ -81,13 +81,14 @@ static PyObject *PkgCacheUpdate(PyObject *Self,PyObject *Args)
PyObject *pyFetchProgressInst = 0;
PyObject *pySourcesList = 0;
- if (PyArg_ParseTuple(Args, "OO", &pyFetchProgressInst,&pySourcesList) == 0)
+ int pulseInterval = 5000;
+ if (PyArg_ParseTuple(Args, "OO|i", &pyFetchProgressInst,&pySourcesList, &pulseInterval) == 0)
return 0;
PyFetchProgress progress;
progress.setCallbackInst(pyFetchProgressInst);
pkgSourceList *source = GetCpp<pkgSourceList*>(pySourcesList);
- bool res = ListUpdate(progress, *source);
+ bool res = ListUpdate(progress, *source, pulseInterval);
PyObject *PyRes = Py_BuildValue("b", res);
return HandleErrors(PyRes);