+ baseURI += "dists/" + Dist + "/";
+ std::string const Release = (Dist == "/") ? "" : Dist;
+ std::string const Site = ::URI::SiteOnly(URI);
+ std::vector<std::string> lang = APT::Configuration::getLanguages(true);
+ if (lang.empty())
+ lang.push_back("none");
+ map<string, vector<debReleaseIndex::debSectionEntry const*> >::const_iterator const src = ArchEntries.find("source");
+ if (src != ArchEntries.end())
+ {
+ std::vector<std::string> const targets = _config->FindVector("APT::Acquire::Targets::deb-src", "", true);
+ for (std::vector<std::string>::const_iterator T = targets.begin(); T != targets.end(); ++T)
+ {
+#define APT_T_CONFIG(X) _config->Find(std::string("APT::Acquire::Targets::deb-src::") + *T + "::" + (X))
+ std::string const MetaKey = APT_T_CONFIG(flatArchive ? "flatMetaKey" : "MetaKey");
+ std::string const ShortDesc = APT_T_CONFIG("ShortDescription");
+ std::string const LongDesc = APT_T_CONFIG(flatArchive ? "flatDescription" : "Description");
+ bool const IsOptional = _config->FindB(std::string("APT::Acquire::Targets::deb-src::") + *T + "::Optional", true);
+#undef APT_T_CONFIG
+ if (MetaKey.empty())
+ continue;
+
+ vector<debReleaseIndex::debSectionEntry const*> const SectionEntries = src->second;
+ for (vector<debReleaseIndex::debSectionEntry const*>::const_iterator I = SectionEntries.begin();
+ I != SectionEntries.end(); ++I)
+ {
+ for (vector<std::string>::const_iterator l = lang.begin(); l != lang.end(); ++l)
+ {
+ if (*l == "none" && MetaKey.find("$(LANGUAGE)") != std::string::npos)
+ continue;
+
+ std::map<std::string, std::string> Options;
+ Options.insert(std::make_pair("SITE", Site));
+ Options.insert(std::make_pair("RELEASE", Release));
+ Options.insert(std::make_pair("COMPONENT", (*I)->Section));
+ Options.insert(std::make_pair("LANGUAGE", *l));
+ Options.insert(std::make_pair("ARCHITECTURE", "source"));
+ Options.insert(std::make_pair("BASE_URI", baseURI));
+ Options.insert(std::make_pair("CREATED_BY", *T));
+ Call(MetaKey, ShortDesc, LongDesc, IsOptional, Options);
+
+ if (MetaKey.find("$(LANGUAGE)") == std::string::npos)
+ break;
+ }