summaryrefslogtreecommitdiff
path: root/apt-pkg/sourcelist.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-01-25 14:53:03 +0100
committerMichael Vogt <mvo@debian.org>2014-01-25 14:53:03 +0100
commit41e6bd080db8995bc7617569f0719bccc31e0da8 (patch)
tree966150f0bd99990c8d805e3641fe71250817f5d3 /apt-pkg/sourcelist.cc
parent34f7c486b10559997849c15c6b51577ec3f96bc1 (diff)
support " " in deb822 source options
Diffstat (limited to 'apt-pkg/sourcelist.cc')
-rw-r--r--apt-pkg/sourcelist.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index 4e580ba04..8462027c5 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -20,6 +20,7 @@
#include <apt-pkg/tagfile.h>
#include <fstream>
+#include <algorithm>
#include <apti18n.h>
/*}}}*/
@@ -94,7 +95,12 @@ bool pkgSourceList::Type::ParseStanza(vector<metaIndex *> &List,
};
for (unsigned int j=0; j < sizeof(option_deb822)/sizeof(char*); j++)
if (Tags.Exists(option_deb822[j]))
- Options[option_internal[j]] = Tags.FindS(option_deb822[j]);
+ {
+ // for deb822 the " " is the delimiter, but the backend expects ","
+ std::string option = Tags.FindS(option_deb822[j]);
+ std::replace(option.begin(), option.end(), ' ', ',');
+ Options[option_internal[j]] = option;
+ }
// now create one item per suite/section
string Suite = Tags.FindS("Suites");