From: David Kalnischkies Date: Sat, 24 Apr 2010 10:15:59 +0000 (+0200) Subject: * apt-pkg/sourcelist.cc: X-Git-Tag: 0.8.0~9^2~58^2~3 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/6838dd8781d2986e51b7c65b7b404a70cfcd2321 * apt-pkg/sourcelist.cc: - be less strict and accept [option=value] as well --- 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 &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()); diff --git a/debian/changelog b/debian/changelog index 94f0cf688..f78f80936 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,8 @@ apt (0.7.26~exp4) experimental; urgency=low - Add a note about APT_CONFIG in the -c description (Closes: #578267) * doc/po/de.po: - correct typos in german apt_preferences manpage, thanks Chris Leick! + * apt-pkg/sourcelist.cc: + - be less strict and accept [option=value] as well [ Jari Aalto ] * cmdline/apt-get.cc: