summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hartwig <mandyke@gmail.com>2012-04-25 18:07:21 +0800
committerDaniel Hartwig <mandyke@gmail.com>2012-04-25 18:07:21 +0800
commit8e201150ede627335a5587de6dfea897637c702c (patch)
treed5f9a1902a27ad067d81b8df074ef6b7fec6013e
parentfd0f5f392d07d0cd739b6b75e49cf9af2d3f402b (diff)
downloadaptitude-8e201150ede627335a5587de6dfea897637c702c.tar.gz
Check for apt_init errors in cmdline_download.cc
Closes: #670379
-rw-r--r--NEWS3
-rw-r--r--src/cmdline/cmdline_download.cc6
2 files changed, 9 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 5b3d62d9..43f0fe42 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,9 @@ Version 0.6.7 "I said 'Step pause turn
* [cmdline]: Avoid dpkg and infinite loop in download-only mode
(Closes: #629266) (LP: #975793)
+ * [cmdline]: Check for apt_init errors in cmdline_download.cc
+ (Closes: #670379)
+
- New translations:
* Croatian (Closes: #667934)
diff --git a/src/cmdline/cmdline_download.cc b/src/cmdline/cmdline_download.cc
index 68329faf..655d6337 100644
--- a/src/cmdline/cmdline_download.cc
+++ b/src/cmdline/cmdline_download.cc
@@ -51,6 +51,12 @@ int cmdline_download(int argc, char *argv[])
shared_ptr<OpProgress> progress = make_text_progress(false, term, term, term);
apt_init(progress.get(), false);
+ if(_error->PendingError())
+ {
+ _error->DumpErrors();
+ return -1;
+ }
+
pkgSourceList list;
if(!list.ReadMainList())
{