]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/sourcelist.cc:
authorDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 24 Apr 2010 10:15:59 +0000 (12:15 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 24 Apr 2010 10:15:59 +0000 (12:15 +0200)
  - be less strict and accept [option=value] as well

apt-pkg/sourcelist.cc
debian/changelog

index a860c7eac51e2e53ef44a933cb7857d5c52406b0..e13472fa664feb1cfa8f3632c9bfddb802a7e3ef 100644 (file)
@@ -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());
index 94f0cf6884b5fc50e6890aebf6fd2edc1ae991fc..f78f809360b35f9d0805d0eb7046289ebc44ae53 100644 (file)
@@ -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: