[Aptitude-svn-commit] r4342 -
branches/aptitude-0.3/aptitude/src/cmdline
Daniel Burrows
dburrows at costa.debian.org
Thu Sep 29 23:21:00 UTC 2005
Author: dburrows
Date: Thu Sep 29 23:21:00 2005
New Revision: 4342
Modified:
branches/aptitude-0.3/aptitude/src/cmdline/cmdline_do_action.cc
Log:
Use the download_manager in cmdline_do_action.
Modified: branches/aptitude-0.3/aptitude/src/cmdline/cmdline_do_action.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/cmdline/cmdline_do_action.cc (original)
+++ branches/aptitude-0.3/aptitude/src/cmdline/cmdline_do_action.cc Thu Sep 29 23:21:00 2005
@@ -15,10 +15,10 @@
#include <generic/apt/apt.h>
#include <generic/apt/config_signal.h>
+#include <generic/apt/download_install_manager.h>
#include <generic/apt/download_signal_log.h>
#include <aptitude.h>
-#include <download.h>
#include <apt-pkg/algorithms.h>
#include <apt-pkg/error.h>
@@ -236,30 +236,11 @@
return 0;
}
- download_signal_log *m = gen_cmdline_download_progress();
- pkgAcquire *acq;
- pkgPackageManager *pm;
-
- bool success = prepare_install_run(&progress, true,
- download_only, m, acq, pm);
- install_run_result run_res;
+ download_install_manager m =
+ new download_install_manager(download_only);
- if(success)
- {
- do
- {
- pkgAcquire::RunResult res = acq->Run();
- run_res = finish_install_run(&progress, true,
- download_only,
- m, acq, pm, res);
- } while(run_res == install_do_again);
- }
-
- delete acq;
- delete pm;
- delete m;
-
- int rval = run_res == install_success ? 0 : -1;
+ int rval =
+ (cmdline_do_download(&m) == download_manager::success ? 0 : -1);
if(_error->PendingError())
rval = -1;
More information about the Aptitude-svn-commit
mailing list