]> git.saurik.com Git - apt.git/commitdiff
Merge remote-tracking branch 'upstream/debian/experimental-no-abi-break' into feature...
authorMichael Vogt <mvo@debian.org>
Tue, 21 Jan 2014 06:20:07 +0000 (07:20 +0100)
committerMichael Vogt <mvo@debian.org>
Tue, 21 Jan 2014 06:20:07 +0000 (07:20 +0100)
Conflicts:
test/integration/test-apt-sources-deb822

1  2 
test/integration/test-apt-sources-deb822
test/libapt/sourcelist_test.cc

index e74fc4cb90ca5b21f144a029e5f19c1d990d862f,6e9a02417c5c64b8134948f9b4918ea0b8474c42..743543cd5cfea8f0db8542ab58b506f659c0e815
@@@ -5,33 -5,44 +5,34 @@@ TESTDIR=$(readlink -f $(dirname $0)
  . $TESTDIR/framework
  
  setupenvironment
- configarchitecture "i386"
+ configarchitecture 'i386'
  
- SOURCES="rootdir/etc/apt/sources.list"
- echo "deb http://ftp.debian.org/debian stable main" > $SOURCES
- testequalwithmsg "Old style sources.list works" "'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/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 
- BASE="# some comment
+ SOURCES='rootdir/etc/apt/sources.list'
+ BASE='# some comment
  # that contains a : as well
 -#Type: meep
 +#Types: meep
  
 -Type: deb
 -URI: http://ftp.debian.org/debian
 +Types: deb
 +URIs: http://ftp.debian.org/debian
  Suites: stable
  Sections: main
 -Comment: Some random string
 - that can be very long'
 -
 +Description: summay
-  and the long part"
++ and the long part'
+ msgtest 'Test old-style sources.list'
+ echo "deb http://ftp.debian.org/debian stable main" > $SOURCES
+ testequal --nomsg "'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/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
  
- # simple case
+ msgtest 'Test simple deb822 sources.list'
  echo "$BASE"  > $SOURCES
- testequalwithmsg "Simple deb822 sources.list works" "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 :
+ testequal --nomsg "'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/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 
+ 'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 "  aptget update --print-uris
  
 -msgtest 'Test deb822 with two sections' 'seperated by comma'
 -echo "$BASE" | sed 's/main/main contrib/' > $SOURCES
 -testequal --nomsg "'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
 -
 -
+ msgtest 'Test deb822 with' 'two entries'
  # Two entries
  echo "$BASE" > $SOURCES
  echo "" >> $SOURCES
@@@ -62,36 -72,16 +62,38 @@@ testequal --nomsg "'http://ftp.debian.o
  '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
  
- # invalid sources.list file
- echo "deb http://ftp.debian.org" > $SOURCES
  
- testequalwithmsg "Invalid sources.list file gives proper error" "E: Malformed line 1 in source list $TMPWORKINGDIRECTORY/rootdir/etc/apt/sources.list (dist)
+ msgtest 'Test old-style sources.list file which has' 'malformed dist'
+ echo "deb http://ftp.debian.org" > $SOURCES
+ testequal --nomsg "E: Malformed line 1 in source list $TMPWORKINGDIRECTORY/rootdir/etc/apt/sources.list (dist)
  E: The list of sources could not be read."  aptget update --print-uris
  
 -
+ msgtest 'Test deb822 sources.list file which has' 'malformed URI'
 -echo "Type: deb
 +echo "Types: deb
  Suites: stable
  " > $SOURCES
- testequalwithmsg "Invalid deb822 sources.list file gives proper error" "E: Malformed stanza 0 in source list $TMPWORKINGDIRECTORY/rootdir/etc/apt/sources.list (URI parse)
+ testequal --nomsg  "E: Malformed stanza 0 in source list $TMPWORKINGDIRECTORY/rootdir/etc/apt/sources.list (URI parse)
  E: The list of sources could not be read."  aptget update --print-uris
- testequalwithmsg "Multiple URIs work" "'http://ftp.de.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.de.debian.org_debian_dists_stable_main_binary-i386_Packages 0 :
 +
 +# with Enabled: false
 +echo "$BASE"  > $SOURCES
 +echo "Enabled: no" >> $SOURCES
 +testempty aptget update --print-uris
 +
 +# multiple URIs
++msgtest 'Test deb822 sources.list file which has' 'Multiple URIs work'
 +echo "$BASE"  | sed -e 's#http://ftp.debian.org/debian#http://ftp.debian.org/debian http://ftp.de.debian.org/debian#' > $SOURCES
- testequalwithmsg "Multiple Types work" "'http://ftp.debian.org/debian/dists/stable/main/source/Sources.bz2' ftp.debian.org_debian_dists_stable_main_source_Sources 0 :
++testequal --nomsg  "'http://ftp.de.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.de.debian.org_debian_dists_stable_main_binary-i386_Packages 0 :
 +'http://ftp.de.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.de.debian.org_debian_dists_stable_main_i18n_Translation-en 0 :
 +'http://ftp.de.debian.org/debian/dists/stable/InRelease' ftp.de.debian.org_debian_dists_stable_InRelease 0 
 +'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/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 
 +
 +# multiple Type in one field
++msgtest 'Test deb822 sources.list file which has' 'Multiple Types work'
 +echo "$BASE"  | sed -e 's#Types: deb#Types: deb deb-src#' > $SOURCES
++testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/main/source/Sources.bz2' ftp.debian.org_debian_dists_stable_main_source_Sources 0 :
 +'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/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 
Simple merge