Browse Source

remove "," in components again

tags/debian/0.9.14.3.exp2
Michael Vogt 7 years ago
parent
commit
db6594dfc5
2 changed files with 1 additions and 16 deletions
  1. +1
    -5
      apt-pkg/sourcelist.cc
  2. +0
    -11
      test/integration/test-apt-sources-deb822

+ 1
- 5
apt-pkg/sourcelist.cc View File

@@ -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);


+ 0
- 11
test/integration/test-apt-sources-deb822 View File

@@ -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