diff options
author | Michael Vogt <mvo@debian.org> | 2013-12-02 08:36:10 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-12-02 08:36:10 +0100 |
commit | 41c24955e8aa1303071348d77f661742270d05c0 (patch) | |
tree | 7d1fc4663f26095f7c9f01e8ab26226ca42e834e /apt-pkg/sourcelist.cc | |
parent | ab2071eba830a092c5d5a0dd33ad94b4a9476109 (diff) |
fix section adding
Diffstat (limited to 'apt-pkg/sourcelist.cc')
-rw-r--r-- | apt-pkg/sourcelist.cc | 11 |
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 |