diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2005-10-20 10:08:11 +0000 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2005-10-20 10:08:11 +0000 |
| commit | e608d6106a75a678fe121afd8020073b9ba80836 (patch) | |
| tree | 7bac460c4af31cf3dd4af36db6dd7c33550740bb /python/progress.cc | |
| parent | d75fe132ec6f5e07dfe96b99dd5ae2905a224386 (diff) | |
| download | python-apt-e608d6106a75a678fe121afd8020073b9ba80836.tar.gz | |
* merged with the progress reporting code
Patches applied:
* michael.vogt@ubuntu.com--2005/python-apt--progress-reporting--0--base-0
tag of michael.vogt@ubuntu.com--2005/python-apt--mvo--0--patch-43
* michael.vogt@ubuntu.com--2005/python-apt--progress-reporting--0--patch-1
* support the apt--progress-reporting--0 branch (using "InstallProgress.statusfd)
* michael.vogt@ubuntu.com--2005/python-apt--progress-reporting--0--patch-2
* support for update reporting via vte/progress bars added, including a evil "pass-me-my-file-descriptor" hack
* michael.vogt@ubuntu.com--2005/python-apt--progress-reporting--0--patch-3
* merged with python-apt--mvo
* michael.vogt@ubuntu.com--2005/python-apt--progress-reporting--0--patch-4
* merged from python-apt--mvo
* michael.vogt@ubuntu.com--2005/python-apt--progress-reporting--0--patch-5
* better support new python-apt, added example for gui-inst with support for VTE_PTY_KEEP_FD
* michael.vogt@ubuntu.com--2005/python-apt--progress-reporting--0--patch-6
* removed the fdsend stuff again, libvte will be patched instead
Diffstat (limited to 'python/progress.cc')
| -rw-r--r-- | python/progress.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/python/progress.cc b/python/progress.cc index f79090f7..fb56ea87 100644 --- a/python/progress.cc +++ b/python/progress.cc @@ -11,6 +11,7 @@ #include <sys/wait.h> #include "progress.h" + // generic bool PyCallbackObj::RunSimpleCallback(const char* method_name, PyObject *arglist, @@ -220,7 +221,7 @@ pkgPackageManager::OrderResult PyInstallProgress::Run(pkgPackageManager *pm) return pkgPackageManager::Failed; } if(!PyArg_Parse(result, "i", &child_id) ) - std::cerr << "result could not be parsed?"<< std::endl; + std::cerr << "custom fork() result could not be parsed?"<< std::endl; //std::cerr << "got: " << child_id << std::endl; } else { //std::cerr << "using build-in fork()" << std::endl; @@ -235,10 +236,14 @@ pkgPackageManager::OrderResult PyInstallProgress::Run(pkgPackageManager *pm) } #endif if (child_id == 0) { - res = pm->DoInstall(); + PyObject *v = PyObject_GetAttrString(callbackInst, "writefd"); + int fd = PyObject_AsFileDescriptor(v); + cout << "got fd: " << fd << endl; + res = pm->DoInstall(fd); _exit(res); } + StartUpdate(); while (waitpid(child_id, &ret, WNOHANG) == 0) UpdateInterface(); |
