diff options
| author | Michael Vogt <mvo@debian.org> | 2005-10-21 21:07:38 +0000 |
|---|---|---|
| committer | Michael Vogt <mvo@debian.org> | 2005-10-21 21:07:38 +0000 |
| commit | f701fc174a88d8f2b418a032571ff40ed6fd56e6 (patch) | |
| tree | d2a0ebed225e24207c952430390a51d3628a03fb /python/depcache.cc | |
| parent | 76bf6920764c1a9a67586d23743f31311b66b811 (diff) | |
| parent | bd6df1d8419eb3403e64191681b32fbd1f3accac (diff) | |
| download | python-apt-f701fc174a88d8f2b418a032571ff40ed6fd56e6.tar.gz | |
* merged with apt--mvo
Patches applied:
* michael.vogt@ubuntu.com--2005/python-apt--mvo--0--patch-77
* merged with the progress reporting code
* michael.vogt@ubuntu.com--2005/python-apt--mvo--0--patch-78
* progress interface fully working now, commit interface too
* michael.vogt@ubuntu.com--2005/python-apt--mvo--0--patch-79
* fix a crasher in the install interface
* 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/depcache.cc')
| -rw-r--r-- | python/depcache.cc | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/python/depcache.cc b/python/depcache.cc index 418ddd14..c78d0077 100644 --- a/python/depcache.cc +++ b/python/depcache.cc @@ -27,6 +27,9 @@ #include <iostream> #include "progress.h" +#ifndef _ +#define _(x) (x) +#endif @@ -96,7 +99,7 @@ static PyObject *PkgDepCacheCommit(PyObject *Self,PyObject *Args) return HandleErrors(); } - std::cout << "PM created" << std::endl; + //std::cout << "PM created" << std::endl; PyInstallProgress iprogress; iprogress.setCallbackInst(pyInstallProgressInst); @@ -124,15 +127,16 @@ static PyObject *PkgDepCacheCommit(PyObject *Self,PyObject *Args) continue; } - //FIXME: report this error somehow -// fprintf(stderr,_("Failed to fetch %s %s\n"),(*I)->DescURI().c_str(), -// (*I)->ErrorText.c_str()); + _error->Warning(_("Failed to fetch %s %s\n"),(*I)->DescURI().c_str(), + (*I)->ErrorText.c_str()); Failed = true; } -#if 0 // check that stuff if (Transient == true && Failed == true) - return Py_None; /*_error->Error(_("--fix-missing and media swapping is not currently supported"));*/ + { + _error->Error(_("--fix-missing and media swapping is not currently supported")); + return HandleErrors(Py_None); + } // Try to deal with missing package files if (Failed == true && PM->FixMissing() == false) @@ -141,7 +145,6 @@ static PyObject *PkgDepCacheCommit(PyObject *Self,PyObject *Args) _error->Error("Aborting install."); return HandleErrors(Py_None); } -#endif _system->UnLock(); @@ -164,29 +167,7 @@ static PyObject *PkgDepCacheCommit(PyObject *Self,PyObject *Args) } _system->Lock(); } - - - -#if 0 - if (Fetcher.Run() == pkgAcquire::Failed) - return HandleErrors(Py_None); - - std::cout << "Fetcher was run" << std::endl; - - // FIXME: incomplete, see apt-get.cc - _system->UnLock(); - - pkgPackageManager::OrderResult Res = PM->DoInstall(); - if (Res == pkgPackageManager::Failed || _error->PendingError() == true) - return Py_None/*false;*/; - if (Res == pkgPackageManager::Completed) - return Py_None /*true;*/; - - _system->Lock(); -#endif - - // FIXME: open the cache here again - + return HandleErrors(Py_None); } |
