← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/fix-af-precise into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/fix-af-precise into lp:launchpad.

Commit message:
Adjust apt-ftparchive tests to use a real source and binary, as recent versions require that all the source files exist on disk.

Requested reviews:
  William Grant (wgrant): code

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/fix-af-precise/+merge/188252

Adjust test_ftparchive to use real source and binary packages, as precise's apt-ftparchive needs all the files to exist.
-- 
https://code.launchpad.net/~wgrant/launchpad/fix-af-precise/+merge/188252
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/archivepublisher/tests/apt-data/Packages'
--- lib/lp/archivepublisher/tests/apt-data/Packages	2010-10-06 11:19:54 +0000
+++ lib/lp/archivepublisher/tests/apt-data/Packages	2013-09-30 01:18:39 +0000
@@ -1,21 +1,17 @@
-Package: quodlibet-ext
-Priority: optional
-Section: sound
-Installed-Size: 68
-Maintainer: Joe Wreschnig <piman@xxxxxxxxxx>
+Package: tiny
+Priority: extra
+Section: devel
+Installed-Size: 25
+Maintainer: Nobody <nobody@xxxxxxxxxxx>
 Architecture: i386
-Source: quodlibet
-Version: 0.13.1-1
-Depends: libatk1.0-0 (>= 1.9.0), libc6 (>= 2.3.4-1), libcairo2 (>= 1.0.2), libfontconfig1 (>= 2.3.0), libglib2.0-0 (>= 2.8.0), libgtk2.0-0 (>= 2.8.0), libpango1.0-0 (>= 1.10.1), libx11-6, libxcursor1 (>> 1.1.2), libxext6, libxfixes3, libxi6, libxinerama1, libxrandr2, libxrender1, quodlibet (= 0.13.1-1)
-Filename: pool/main/f/foo/foo_1_i386.deb
-Size: 11884
-MD5sum: c4908a901e44d6d5282f7889cd0b7cb0
-SHA1: 1ef5dbfe0584c39718c78092dbbdaf417a51fc72
-SHA256: 19e2946d2434d72d8f7df2da2a6ec3b8da4420266af33ccd75f28ab5ade43fc4
-Description: extensions for the Quod Libet audio player
- This package contains architecture-dependent extensions to Quod
- Libet. It adds a notification area icon and multimedia key support
- to Quod Libet.
- .
- Quod Libet is an audio player for GTK+.
+Version: 0.1
+Filename: pool/main/t/tiny/tiny_0.1_i386.deb
+Size: 932
+MD5sum: 390074949d9533c4cf6774b9891306d0
+SHA1: 1beb6c7f6be8d5b9d86335a0a939b1b49aec9aa9
+SHA256: d652be5856066b3f5bb8df43e43199ee480aa65a1ccf8e78be4178a824c493ce
+Description: A tiny test package.
+ Doesn't really do anything at all.
+Bugs: https://bugs.launchpad.net/ubuntu/+filebug
+Origin: Ubuntu
 

=== modified file 'lib/lp/archivepublisher/tests/apt-data/Sources'
--- lib/lp/archivepublisher/tests/apt-data/Sources	2010-10-06 11:19:54 +0000
+++ lib/lp/archivepublisher/tests/apt-data/Sources	2013-09-30 01:18:39 +0000
@@ -1,16 +1,17 @@
-Package: foo
-Binary: foo
-Version: 2.15-4
+Package: tiny
+Binary: tiny
+Version: 0.1
 Priority: extra
-Section: misc
-Maintainer: James Troup <james@xxxxxxxxxx>
-Build-Depends: autoconf (>= 2.13), bison, flex, gettext, texinfo, binutils (>= 2.9.5.0.12), gcc (>= 2.95.2-1), dejagnu (>= 1.4.2-1.1), expect (>= 5.32.2-1), dpatch, file
+Section: devel
+Maintainer: Nobody <nobody@xxxxxxxxxxx>
+Build-Depends: debhelper
 Architecture: any
-Standards-Version: 3.6.1.0
+Standards-Version: 3.9.4.0
 Format: 1.0
-Directory: pool/main/f/foo
+Directory: pool/main/t/tiny
 Files:
- bf8ef0ec49274621a72c941fbd1d70ed 1326 foo_1.dsc
- ea140e23ae50a61a79902aa67da5214e 15134701 binutils_2.15.orig.tar.gz
- 2cf84daeca019220f5f3753121f012bb 36466 binutils_2.15-4.diff.gz
+ 4699a6dda30a4a32c6264c931a601da5 444 tiny_0.1.dsc
+ 63a97b775d908be8426e8891e582f1c2 485 tiny_0.1.tar.gz
+Package-List: 
+ tiny deb devel extra
 

=== removed file 'lib/lp/archivepublisher/tests/apt-data/foo_1.dsc'
--- lib/lp/archivepublisher/tests/apt-data/foo_1.dsc	2010-10-06 11:19:54 +0000
+++ lib/lp/archivepublisher/tests/apt-data/foo_1.dsc	1970-01-01 00:00:00 +0000
@@ -1,32 +0,0 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-Format: 1.0
-Source: foo
-Version: 2.15-4
-Binary: foo
-Maintainer: James Troup <james@xxxxxxxxxx>
-Architecture: any
-Standards-Version: 3.6.1.0
-Build-Depends: autoconf (>= 2.13), bison, flex, gettext, texinfo, binutils (>= 2.9.5.0.12), gcc (>= 2.95.2-1), dejagnu (>= 1.4.2-1.1), expect (>= 5.32.2-1), dpatch, file
-Files: 
- ea140e23ae50a61a79902aa67da5214e 15134701 binutils_2.15.orig.tar.gz
- 2cf84daeca019220f5f3753121f012bb 36466 binutils_2.15-4.diff.gz
-
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.2.5 (GNU/Linux)
-
-iQIVAwUBQVNHotfD8TGrKpH1AQIqLg//QsbdANANRizvgO59kdxEZ7pqbUWQh3/H
-GDeBemtPJg1k9h3sMCQK2AoCGAQ+8wbTCvIyXA0j+J6h0j0dR+3xYWiDZHnWmDw1
-V7pcPfG8biNL63KjVULuQAqT1BgTfHJQjiNvIysK0XGWpDY8kPAZnfpHZUwZpOwh
-W9jH93sTi5q6HtnOM3UK/Xzi+xzhWq+lhbyQKljvp1Z3Y8V9/Du7jJfm2zTnvAck
-lXUUH4x+xUqNs6U/L4GwK+grJDC8MNA3NgyfyffOETJ6apKEMen10CT1oMUCsKRF
-U27qFuOsB9CNyNQ19kiya1FnaL63amdYnmS/exG1RagUCcLBchhO9/gXfpjsE5oO
-tQn6iAWXCxGiNjqCaZdaE+fE6sGY94Y8/YB+RGQVKXe9NWWB5AGfb91+icyFYt2t
-hLc9WhjRUjZy8VnzEcCD6X4ls1r3HjQW6+jbUIoYce5ch6X7QzflZml4bvnSeu2H
-yQv1Uxmi89c5ROFKdM9e4MaYiA2TCSNfQXCZ/IJZMhLW5jkjhsI39uKidwbTqQSU
-smDB2f/W3AnlI9FvFaGWCYGLw7mSfsJOYDQ91Jq65rzvH1M4WCYZyDP9ZdLhx3TE
-sw2G9JAw0ilf07qdZImLakJcJggIng2Q3NNmxpRZeOhXzA336TJa/iECl5UTw6AQ
-tiYC6suJ37k=
-=pkIS
------END PGP SIGNATURE-----

=== removed file 'lib/lp/archivepublisher/tests/apt-data/foo_1_i386.deb'
Binary files lib/lp/archivepublisher/tests/apt-data/foo_1_i386.deb	2010-10-06 11:19:54 +0000 and lib/lp/archivepublisher/tests/apt-data/foo_1_i386.deb	1970-01-01 00:00:00 +0000 differ
=== modified file 'lib/lp/archivepublisher/tests/apt-data/hoary-test_main_binary-i386'
--- lib/lp/archivepublisher/tests/apt-data/hoary-test_main_binary-i386	2010-10-06 11:19:54 +0000
+++ lib/lp/archivepublisher/tests/apt-data/hoary-test_main_binary-i386	2013-09-30 01:18:39 +0000
@@ -1,1 +1,1 @@
-/var/tmp/archive/ubuntutest/pool/main/f/foo/foo_1_i386.deb
+/var/tmp/archive/ubuntutest/pool/main/t/tiny/tiny_0.1_i386.deb

=== modified file 'lib/lp/archivepublisher/tests/apt-data/hoary-test_main_source'
--- lib/lp/archivepublisher/tests/apt-data/hoary-test_main_source	2010-10-06 11:19:54 +0000
+++ lib/lp/archivepublisher/tests/apt-data/hoary-test_main_source	2013-09-30 01:18:39 +0000
@@ -1,1 +1,1 @@
-/var/tmp/archive/ubuntutest/pool/main/f/foo/foo_1.dsc
+/var/tmp/archive/ubuntutest/pool/main/t/tiny/tiny_0.1.dsc

=== modified file 'lib/lp/archivepublisher/tests/apt-data/override.hoary-test.extra.main'
--- lib/lp/archivepublisher/tests/apt-data/override.hoary-test.extra.main	2009-04-17 10:32:16 +0000
+++ lib/lp/archivepublisher/tests/apt-data/override.hoary-test.extra.main	2013-09-30 01:18:39 +0000
@@ -1,2 +1,2 @@
-foo	Origin	Ubuntu
-foo	Bugs	https://bugs.launchpad.net/ubuntu/+filebug
+tiny	Origin	Ubuntu
+tiny	Bugs	https://bugs.launchpad.net/ubuntu/+filebug

=== modified file 'lib/lp/archivepublisher/tests/apt-data/override.hoary-test.main'
--- lib/lp/archivepublisher/tests/apt-data/override.hoary-test.main	2006-08-24 11:57:44 +0000
+++ lib/lp/archivepublisher/tests/apt-data/override.hoary-test.main	2013-09-30 01:18:39 +0000
@@ -1,1 +1,1 @@
-foo	extra	misc
+tiny	extra	devel

=== modified file 'lib/lp/archivepublisher/tests/apt-data/override.hoary-test.main.src'
--- lib/lp/archivepublisher/tests/apt-data/override.hoary-test.main.src	2006-08-24 11:57:44 +0000
+++ lib/lp/archivepublisher/tests/apt-data/override.hoary-test.main.src	2013-09-30 01:18:39 +0000
@@ -1,1 +1,1 @@
-foo	misc
+tiny	devel

=== added file 'lib/lp/archivepublisher/tests/apt-data/tiny_0.1.dsc'
--- lib/lp/archivepublisher/tests/apt-data/tiny_0.1.dsc	1970-01-01 00:00:00 +0000
+++ lib/lp/archivepublisher/tests/apt-data/tiny_0.1.dsc	2013-09-30 01:18:39 +0000
@@ -0,0 +1,16 @@
+Format: 1.0
+Source: tiny
+Binary: tiny
+Architecture: any
+Version: 0.1
+Maintainer: Nobody <nobody@xxxxxxxxxxx>
+Standards-Version: 3.9.4.0
+Build-Depends: debhelper
+Package-List: 
+ tiny deb devel extra
+Checksums-Sha1: 
+ d19603504f4c5c347dd6871d03bf232c7d54516a 485 tiny_0.1.tar.gz
+Checksums-Sha256: 
+ 8a4a42063805dc1f9ee52b201b58da7c4aa594d6ad916673827320458bf0d9b2 485 tiny_0.1.tar.gz
+Files: 
+ 63a97b775d908be8426e8891e582f1c2 485 tiny_0.1.tar.gz

=== added file 'lib/lp/archivepublisher/tests/apt-data/tiny_0.1.tar.gz'
Binary files lib/lp/archivepublisher/tests/apt-data/tiny_0.1.tar.gz	1970-01-01 00:00:00 +0000 and lib/lp/archivepublisher/tests/apt-data/tiny_0.1.tar.gz	2013-09-30 01:18:39 +0000 differ
=== added file 'lib/lp/archivepublisher/tests/apt-data/tiny_0.1_i386.deb'
Binary files lib/lp/archivepublisher/tests/apt-data/tiny_0.1_i386.deb	1970-01-01 00:00:00 +0000 and lib/lp/archivepublisher/tests/apt-data/tiny_0.1_i386.deb	2013-09-30 01:18:39 +0000 differ
=== modified file 'lib/lp/archivepublisher/tests/test_ftparchive.py'
--- lib/lp/archivepublisher/tests/test_ftparchive.py	2013-07-05 14:27:12 +0000
+++ lib/lp/archivepublisher/tests/test_ftparchive.py	2013-09-30 01:18:39 +0000
@@ -161,19 +161,20 @@
         fa.publisher.archive = hoary.main_archive
         return fa, hoary
 
-    def _publishDefaultOverrides(self, fa, component, section='misc',
+    def _publishDefaultOverrides(self, fa, component, section='devel',
                                  phased_update_percentage=None,
                                  binpackageformat=BinaryPackageFormat.DEB):
-        source_overrides = FakeSelectResult([('foo', component, section)])
+        source_overrides = FakeSelectResult([('tiny', component, section)])
         binary_overrides = FakeSelectResult([(
-            'foo', component, section, 'i386', PackagePublishingPriority.EXTRA,
-            binpackageformat, phased_update_percentage)])
+            'tiny', component, section, 'i386',
+            PackagePublishingPriority.EXTRA, binpackageformat,
+            phased_update_percentage)])
         fa.publishOverrides('hoary-test', source_overrides, binary_overrides)
 
     def _publishDefaultFileLists(self, fa, component):
-        source_files = FakeSelectResult([('foo', 'foo_1.dsc', component)])
+        source_files = FakeSelectResult([('tiny', 'tiny_0.1.dsc', component)])
         binary_files = FakeSelectResult(
-            [('foo', 'foo_1_i386.deb', component, 'binary-i386')])
+            [('tiny', 'tiny_0.1_i386.deb', component, 'binary-i386')])
         fa.publishFileLists('hoary-test', source_files, binary_files)
 
     def test_getSourcesForOverrides(self):
@@ -260,7 +261,7 @@
         path = os.path.join(self._overdir, "override.hoary-test.extra.main")
         with open(path) as result_file:
             self.assertIn(
-                "foo/i386\tPhased-Update-Percentage\t50",
+                "tiny/i386\tPhased-Update-Percentage\t50",
                 result_file.read().splitlines())
 
     def test_publishOverrides_udebs(self):
@@ -279,7 +280,7 @@
             self._overdir, "override.hoary-test.main.debian-installer")
         with open(path) as result_file:
             self.assertEqual(
-                ["foo\textra\tdebian-installer"],
+                ["tiny\textra\tdebian-installer"],
                 result_file.read().splitlines())
 
     def test_publishOverrides_ddebs_disabled(self):
@@ -312,7 +313,7 @@
         path = os.path.join(self._overdir, "override.hoary-test.main.debug")
         with open(path) as result_file:
             self.assertEqual(
-                ["foo\textra\tmisc"], result_file.read().splitlines())
+                ["tiny\textra\tdevel"], result_file.read().splitlines())
 
     def test_generateOverrides(self):
         # generateOverrides generates all the overrides from start to finish.
@@ -426,8 +427,9 @@
         self._publishDefaultFileLists(fa, 'main')
 
         # Add mentioned files in the repository pool/.
-        self._addRepositoryFile('main', 'foo', 'foo_1.dsc')
-        self._addRepositoryFile('main', 'foo', 'foo_1_i386.deb')
+        self._addRepositoryFile('main', 'tiny', 'tiny_0.1.dsc')
+        self._addRepositoryFile('main', 'tiny', 'tiny_0.1.tar.gz')
+        self._addRepositoryFile('main', 'tiny', 'tiny_0.1_i386.deb')
 
         # When include_long_descriptions is set, apt.conf has
         # LongDescription "true" for that series.
@@ -591,22 +593,22 @@
         fa.createEmptyPocketRequests(fullpublish=True)
 
         # Set up an initial repository.
-        source_overrides = FakeSelectResult([("foo", "main", "misc")])
+        source_overrides = FakeSelectResult([("tiny", "main", "devel")])
         binary_overrides = FakeSelectResult([(
             "bin%d" % i, "main", "misc", "i386",
             PackagePublishingPriority.EXTRA, BinaryPackageFormat.DEB, None)
             for i in range(10)])
         fa.publishOverrides("hoary-test", source_overrides, binary_overrides)
-        source_files = FakeSelectResult([("foo", "foo_1.dsc", "main")])
+        source_files = FakeSelectResult([("tiny", "tiny_0.1.dsc", "main")])
         binary_files = FakeSelectResult([(
             "bin%d" % i, "bin%d_1_i386.deb" % i, "main", "binary-i386")
             for i in range(10)])
         fa.publishFileLists("hoary-test", source_files, binary_files)
-        self._addRepositoryFile("main", "foo", "foo_1.dsc")
+        self._addRepositoryFile("main", "tiny", "tiny_0.1.dsc")
         for i in range(10):
             self._addRepositoryFile(
                 "main", "bin%d" % i, "bin%d_1_i386.deb" % i,
-                samplename="foo_1_i386.deb")
+                samplename="tiny_0.1_i386.deb")
         apt_conf = fa.generateConfig(fullpublish=True)
         fa.runApt(apt_conf)
 


References