summaryrefslogtreecommitdiff
path: root/apt-pkg/sourcelist.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-05-04 10:06:57 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-05-04 10:06:57 +0200
commitaf8a8da9c1aa6506d230a0df8abc670661176ba3 (patch)
tree343935c56f2294c835082233398fdef5d5d5e2eb /apt-pkg/sourcelist.cc
parent549edd163e34a50091623b47881f2eefbdc53aca (diff)
parentedde664d0cc5fe46f572696c605832700c553b9e (diff)
merged from davids branch
Diffstat (limited to 'apt-pkg/sourcelist.cc')
-rw-r--r--apt-pkg/sourcelist.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index a860c7eac..e13472fa6 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -94,6 +94,13 @@ bool pkgSourceList::Type::ParseLine(vector<metaIndex *> &List,
if (option.length() < 3)
return _error->Error(_("Malformed line %lu in source list %s ([option] too short)"),CurLine,File.c_str());
+ // accept options even if the last has no space before the ]-end marker
+ if (option.at(option.length()-1) == ']')
+ {
+ for (; *Buffer != ']'; --Buffer);
+ option.resize(option.length()-1);
+ }
+
size_t const needle = option.find('=');
if (needle == string::npos)
return _error->Error(_("Malformed line %lu in source list %s ([%s] is not an assignment)"),CurLine,File.c_str(), option.c_str());