]> git.saurik.com Git - apt.git/commitdiff
* test/authReliability/sources.list.good:
authorMichael Vogt <michael.vogt@ubuntu.com>
Wed, 2 Jan 2008 13:04:11 +0000 (14:04 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Wed, 2 Jan 2008 13:04:11 +0000 (14:04 +0100)
  - add missing file to make the tests work again
* apt-pkg/acquire-item.cc:
  - fix I-M-S hits with file:// uris
* test/pre-upload-check.py:
  - better error messages
  - use "apt-get" by default (instead of ../bin/apt-get)

apt-pkg/acquire-item.cc
test/authReliability/sources.list.good [new file with mode: 0644]
test/pre-upload-check.py

index 54526ab058909a1032419a74ba010b1b4c9c423f..ad48adcffa2aabe51e0c758ca977a48e7e05e555 100644 (file)
@@ -935,6 +935,9 @@ void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash,
    else
    {
       RetrievalDone(Message);
+      if (!Complete)
+         // Still more retrieving to do
+         return;
 
       if (SigFile == "")
       {
@@ -987,6 +990,7 @@ void pkgAcqMetaIndex::RetrievalDone(string Message)
       FinalFile += URItoFileName(RealURI);
       DestFile = FinalFile;
    }
+   Complete = true;
 }
 
 void pkgAcqMetaIndex::AuthDone(string Message)
@@ -1172,7 +1176,7 @@ void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
         _error->Warning(_("A error occurred during the signature "
                           "verification. The repository is not updated "
                           "and the previous index files will be used."
-                          "GPG error: %s: %s\n"
+                          "GPG error: %s: %s\n"),
                         Desc.Description.c_str(),
                         LookupTag(Message,"Message").c_str());
         return;
diff --git a/test/authReliability/sources.list.good b/test/authReliability/sources.list.good
new file mode 100644 (file)
index 0000000..2e9a445
--- /dev/null
@@ -0,0 +1,2 @@
+deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/gpg-package-ok/ /
+
index 75a726808e6a9c1d647af8f4a9bc9e6213e177a5..ca44ec726640d122d9f6c3935bd88e3be85405f3 100755 (executable)
@@ -21,7 +21,8 @@ class testAptAuthenticationReliability(unittest.TestCase):
     test if the spec https://wiki.ubuntu.com/AptAuthenticationReliability 
     is properly implemented
     """
-    apt = "../bin/apt-get"
+    #apt = "../bin/apt-get"
+    apt = "apt-get"
 
     def setUp(self):
         pass
@@ -68,7 +69,7 @@ class testAptAuthenticationReliability(unittest.TestCase):
                    ] + apt_args,
                    stdout=stdout, stderr=stderr)
         self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release.gpg"),
-                     "The gpg file disappeared, this should not happen")
+                     "The gpg file disappeared after a regular download, this should not happen")
         self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Packages"),
                      "The Packages file disappeared, this should not happen")
         # test good is still good after non I-M-S hit and a previous files in lists/
@@ -82,7 +83,7 @@ class testAptAuthenticationReliability(unittest.TestCase):
                    ] + apt_args,
                    stdout=stdout, stderr=stderr)
         self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release.gpg"),
-                     "The gpg file disappeared, this should not happen")
+                     "The gpg file disappeared after a I-M-S hit, this should not happen")
         self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Packages"),
                      "The Packages file disappeared, this should not happen")
         # test good is still good after I-M-S hit