summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog8
-rw-r--r--methods/mirror.cc14
2 files changed, 19 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 8cc9b53e1..c5e5d9d17 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,12 +1,18 @@
apt (0.8.14.1ubuntu6) UNRELEASEDoneiric; urgency=low
+ [ Brian Murray ]
* apt-pkg/deb/dpkgpm.cc:
- prevent reporting of package installation failures due to inaccessible
local files (LP: #791102, #790040)
- include /var/log/apt/history.log in apport-package reports so we know
the context for the package management request
+
+ [ Michael Vogt ]
+ * methods/mirror.cc:
+ - ignore lines starting with "#" in the mirror file
+ - ignore non http urls in the mirrors
- -- Brian Murray <brian@ubuntu.com> Wed, 01 Jun 2011 12:32:31 -0700
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 07 Jun 2011 08:49:43 +0200
apt (0.8.14.1ubuntu5) oneiric; urgency=low
diff --git a/methods/mirror.cc b/methods/mirror.cc
index 2cf5c9ce1..8a7228def 100644
--- a/methods/mirror.cc
+++ b/methods/mirror.cc
@@ -274,8 +274,18 @@ bool MirrorMethod::InitMirrors()
while (!in.eof())
{
getline(in, s);
- if (s.size() > 0)
- AllMirrors.push_back(s);
+
+ // ignore lines that start with #
+ if (s.find("#") == 0)
+ continue;
+ // ignore empty lines
+ if (s.size() == 0)
+ continue;
+ // ignore non http lines
+ if (s.find("http://") != 0)
+ continue;
+
+ AllMirrors.push_back(s);
}
Mirror = AllMirrors[0];
UsedMirror = Mirror;