diff options
author | Michael Vogt <mvo@debian.org> | 2013-12-09 08:33:28 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-12-09 08:35:06 +0100 |
commit | 42e19c826b9da6c21a6d286f31db51bc04c73d87 (patch) | |
tree | 46509ee5445bcf532cc2d698b1f7aae7a14f5e27 | |
parent | fce9f472046344d15d4f4df281a003d837cf4177 (diff) |
suppoer $(ARCH) in deb822 sources.list as well
-rw-r--r-- | apt-pkg/sourcelist.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index 0bbb2bd3f..99cdbe030 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -327,6 +327,7 @@ bool pkgSourceList::ParseFileDeb822(string File) { if(!Tags.Exists("Type")) continue; + string const type = Tags.FindS("Type"); Type *Parse = Type::GetType(type.c_str()); if (Parse == 0) @@ -335,8 +336,10 @@ bool pkgSourceList::ParseFileDeb822(string File) string URI = Tags.FindS("URL"); if (!Parse->FixupURI(URI)) return _error->Error(_("Malformed stanza %u in source list %s (URI parse)"),i,Fd.Name().c_str()); - string const Dist = Tags.FindS("Dist"); - string const Section = Tags.FindS("Section"); + + string Dist = Tags.FindS("Dist"); + Dist = SubstVar(Dist,"$(ARCH)",_config->Find("APT::Architecture")); + // check if there are any options we support const char* option_str[] = { "arch", "arch+", "arch-", "trusted" }; @@ -345,6 +348,7 @@ bool pkgSourceList::ParseFileDeb822(string File) Options[option_str[j]] = Tags.FindS(option_str[j]); // now create one item per section + string const Section = Tags.FindS("Section"); std::vector<std::string> list; if (Section.find(",")) list = StringSplit(Section, ","); |