From d65882227dd3201c03c87922391d1ad8d21ee84e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 12 Sep 2006 11:32:37 +0200 Subject: * python/pkgmanager.cc: - fix typo --- debian/changelog | 7 +++++++ python/pkgmanager.cc | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 783e510f..89fe3ccf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +python-apt (0.6.20) unstable; urgency=low + + * python/pkgmanager.cc: + - fix typo (closes: #382853) + + -- + python-apt (0.6.19) unstable; urgency=low [ Michael Vogt ] diff --git a/python/pkgmanager.cc b/python/pkgmanager.cc index bcd4c45b..9670f238 100644 --- a/python/pkgmanager.cc +++ b/python/pkgmanager.cc @@ -68,7 +68,7 @@ static PyObject *PkgManagerFixMissing(PyObject *Self,PyObject *Args) static PyMethodDef PkgManagerMethods[] = { - {"GetArchives",PkgManagerGetArchives,METH_VARARGS,"Load the selected archvies into the fetcher"}, + {"GetArchives",PkgManagerGetArchives,METH_VARARGS,"Load the selected archives into the fetcher"}, {"DoInstall",PkgManagerDoInstall,METH_VARARGS,"Do the actual install"}, {"FixMissing",PkgManagerFixMissing,METH_VARARGS,"Fix the install if a pkg couldn't be downloaded"}, {} -- cgit v1.2.3 From 8572d7a6dff1c3b5e8b27fcfbc36bd13232be598 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 12 Sep 2006 12:28:50 +0200 Subject: * debian/control: - tightend dependency * apt/progress.py: - use os._exit() instead of sys.exit() (lp: 53298) --- apt/progress.py | 9 +++++++-- debian/changelog | 4 ++++ debian/control | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/apt/progress.py b/apt/progress.py index 4119067c..d69ca6e6 100644 --- a/apt/progress.py +++ b/apt/progress.py @@ -19,7 +19,12 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA -import sys, apt_pkg, os, fcntl, string, re +import sys +import os +import re +import fcntl +import string +import apt_pkg class OpProgress(object): """ Abstract class to implement reporting on cache opening @@ -199,7 +204,7 @@ class InstallProgress(DumbInstallProgress): if pid == 0: # child res = pm.DoInstall(self.writefd) - sys.exit(res) + os._exit(res) self.child_pid = pid res = self.waitChild() return res diff --git a/debian/changelog b/debian/changelog index 89fe3ccf..5f8db68b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,10 @@ python-apt (0.6.20) unstable; urgency=low * python/pkgmanager.cc: - fix typo (closes: #382853) + * debian/control: + - tightend dependency (closes: #383478) + * apt/progress.py: + - use os._exit() in the child (lp: #53298) -- diff --git a/debian/control b/debian/control index 5fa1bc83..e2f97b78 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Maintainer: APT Development Team Uploaders: Matt Zimmerman , Michael Vogt Standards-Version: 3.6.2.0 XS-Python-Version: all -Build-Depends: debhelper (>= 5.0.37.1), libapt-pkg-dev (>= 0.6.40), apt-utils, python-all-dev, python-central +Build-Depends: debhelper (>= 5.0.37.1), libapt-pkg-dev (>= 0.6.45), apt-utils, python-all-dev, python-central Package: python-apt Architecture: any -- cgit v1.2.3 From 7035132c76acf5fd72e62437e487f411bf726d5c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 12 Sep 2006 15:16:33 +0200 Subject: * apt/progress.py: - use select() when waiting for child input --- apt/progress.py | 9 ++++++--- debian/changelog | 1 + doc/examples/inst.py | 5 +---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/apt/progress.py b/apt/progress.py index d69ca6e6..8ac0e1dc 100644 --- a/apt/progress.py +++ b/apt/progress.py @@ -24,6 +24,8 @@ import os import re import fcntl import string +from errno import * +import select import apt_pkg class OpProgress(object): @@ -144,6 +146,7 @@ class InstallProgress(DumbInstallProgress): """ def __init__(self): DumbInstallProgress.__init__(self) + self.selectTimeout = 0.1 (read, write) = os.pipe() self.writefd=write self.statusfd = os.fdopen(read, "r") @@ -167,7 +170,7 @@ class InstallProgress(DumbInstallProgress): self.read += os.read(self.statusfd.fileno(),1) except OSError, (errno,errstr): # resource temporarly unavailable is ignored - if errno != 11: + if errno != EAGAIN and errnor != EWOULDBLOCK: print errstr if self.read.endswith("\n"): s = self.read @@ -189,15 +192,15 @@ class InstallProgress(DumbInstallProgress): self.percent = float(percent) self.status = string.strip(status_str) self.read = "" - def fork(self): return os.fork() def waitChild(self): while True: + select.select([self.statusfd],[],[], self.selectTimeout) + self.updateInterface() (pid, res) = os.waitpid(self.child_pid,os.WNOHANG) if pid == self.child_pid: break - self.updateInterface() return os.WEXITSTATUS(res) def run(self, pm): pid = self.fork() diff --git a/debian/changelog b/debian/changelog index 5f8db68b..02ec00a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ python-apt (0.6.20) unstable; urgency=low - tightend dependency (closes: #383478) * apt/progress.py: - use os._exit() in the child (lp: #53298) + - use select() when checking for statusfd (lp: #53282) -- diff --git a/doc/examples/inst.py b/doc/examples/inst.py index 0e91c28f..ff9d452c 100644 --- a/doc/examples/inst.py +++ b/doc/examples/inst.py @@ -29,10 +29,7 @@ cache = apt.Cache(apt.progress.OpTextProgress()) fprogress = apt.progress.TextFetchProgress() iprogress = TextInstallProgress() -pkg = cache["test-package"] -pkg.markUpgrade() -cache.commit(fprogress,iprogress) -sys.exit(1) +pkg = cache["3dchess"] # install or remove, the importend thing is to keep us busy :) if pkg.isInstalled: -- cgit v1.2.3 From 8df7cb6c729a5451f231f2cd3e82fc495eaea289 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 12 Sep 2006 15:35:55 +0200 Subject: * fix missing docstring --- debian/changelog | 4 ++++ python/apt_pkgmodule.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 02ec00a1..7029a040 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,10 @@ python-apt (0.6.20) unstable; urgency=low * apt/progress.py: - use os._exit() in the child (lp: #53298) - use select() when checking for statusfd (lp: #53282) + * acknoledge NMU (closes: #378048, #373512) + * python/apt_pkgmodule.cc: + - fix missing docstring (closes: #368907), + Thanks to Josh Triplett -- diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc index b1c5c2a5..24d876af 100644 --- a/python/apt_pkgmodule.cc +++ b/python/apt_pkgmodule.cc @@ -440,7 +440,7 @@ static PyMethodDef methods[] = {"GetPkgAcqFile",(PyCFunction)GetPkgAcqFile,METH_KEYWORDS|METH_VARARGS,"GetPkgAcquireFile() -> pkgAcquireFile"}, // PkgManager - {"GetPackageManager",GetPkgManager,METH_VARARGS,"GetPackageManager() -> PackageManager"}, + {"GetPackageManager",GetPkgManager,METH_VARARGS,"GetPackageManager(DepCache) -> PackageManager"}, {} }; -- cgit v1.2.3