summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-12-02 08:36:10 +0100
committerMichael Vogt <mvo@debian.org>2013-12-05 15:30:56 +0100
commit300b15e3456aff88b3016a8bac90a0ba8911db8f (patch)
treefa1f3f1f2967e1a46d3249cb1a596e1c442cca31 /apt-pkg
parentcaeb19b796f7045f489dbce0bf681925d49136a9 (diff)
fix section adding
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/sourcelist.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index 1261ebb52..4883e2fab 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -273,7 +273,16 @@ bool pkgSourceList::ReadAppend(string File)
for (unsigned int j=0; j < sizeof(option_str)/sizeof(char*); j++)
if (Tags.Exists(option_str[j]))
Options[option_str[j]] = Tags.FindS(option_str[j]);
- Parse->CreateItem(SrcList, URI, Dist, Section, Options);
+
+ // now create one item per section
+ std::vector<std::string> list;
+ if (Section.find(","))
+ list = StringSplit(Section, ",");
+ else
+ list = StringSplit(Section, " ");
+ for (int i=0; i < list.size(); i++)
+ Parse->CreateItem(SrcList, URI, Dist, list[i], Options);
+
i++;
}
// we are done