summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-01-25 21:55:11 +0100
committerMichael Vogt <mvo@debian.org>2014-01-25 21:55:11 +0100
commit4810a5ad5ac43afda65dbc378a0373e67dd7a41d (patch)
tree2ee1702cb5994ce2c1d5bcb1ad843af3db894cff
parent62dcafb391a940534d5fb3b804dc461b1187d706 (diff)
parent41e6bd080db8995bc7617569f0719bccc31e0da8 (diff)
Merge remote-tracking branch 'mvo/debian/sid' into debian/sid
-rw-r--r--apt-pkg/sourcelist.cc8
-rwxr-xr-xtest/integration/test-apt-sources-deb8222
2 files changed, 8 insertions, 2 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index ac326d157..1f5179885 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>
/*}}}*/
@@ -91,7 +92,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");
diff --git a/test/integration/test-apt-sources-deb822 b/test/integration/test-apt-sources-deb822
index 743543cd5..742adb5e2 100755
--- a/test/integration/test-apt-sources-deb822
+++ b/test/integration/test-apt-sources-deb822
@@ -56,7 +56,7 @@ testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/P
msgtest 'Test deb822' 'architecture option'
echo "$BASE" > $SOURCES
-echo "Architectures: amd64,armel" >> $SOURCES
+echo "Architectures: amd64 armel" >> $SOURCES
testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/main/binary-amd64/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-amd64_Packages 0 :
'http://ftp.debian.org/debian/dists/stable/main/binary-armel/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-armel_Packages 0 :
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 :