Browse Source

remove "," in components again

debian/1.8.y
Michael Vogt 9 years ago
parent
commit
db6594dfc5
  1. 6
      apt-pkg/sourcelist.cc
  2. 11
      test/integration/test-apt-sources-deb822

6
apt-pkg/sourcelist.cc

@ -363,11 +363,7 @@ int pkgSourceList::ParseFileDeb822(string File)
// now create one item per section
string const Section = Tags.FindS("Section");
std::vector<std::string> list;
if (Section.find(","))
list = StringSplit(Section, ",");
else
list = StringSplit(Section, " ");
std::vector<std::string> list = StringSplit(Section, " ");
for (std::vector<std::string>::const_iterator I = list.begin();
I != list.end(); I++)
Parse->CreateItem(SrcList, URI, Dist, (*I), Options);

11
test/integration/test-apt-sources-deb822

@ -33,17 +33,6 @@ testequalwithmsg "Simple deb822 sources.list works" "'http://ftp.debian.org/debi
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 :
'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris
# two sections (we support both "," and " " as seperator)
echo "$BASE" | sed s/main/"main,contrib"/ > $SOURCES
testequalwithmsg "Two sections deb822 sources.list work" "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 :
'http://ftp.debian.org/debian/dists/stable/contrib/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_contrib_binary-i386_Packages 0 :
'http://ftp.debian.org/debian/dists/stable/contrib/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_contrib_i18n_Translation-en 0 :
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 :
'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris
# Two entries
echo "$BASE" > $SOURCES
echo "" >> $SOURCES

Loading…
Cancel
Save