]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
Fix the MirrorManager tests to be dist-agnostic too.
authorCameron <camrdale@stevepad.(none)>
Wed, 19 Dec 2007 00:06:32 +0000 (16:06 -0800)
committerCameron <camrdale@stevepad.(none)>
Wed, 19 Dec 2007 00:06:32 +0000 (16:06 -0800)
apt_dht/MirrorManager.py

index 6795cc04dd77b9428d0864fb6be9edab330f5593..67bb183acadd0b130c9890eb45f4a90c1bb02614 100644 (file)
@@ -96,8 +96,8 @@ class TestMirrorManager(unittest.TestCase):
                     "%s hashes don't match: %s != %s" % (path, found_hash[0], true_hash))
 
     def test_findHash(self):
-        self.packagesFile = os.popen('ls -Sr /var/lib/apt/lists/ | grep -E "Packages$" | tail -n 1').read().rstrip('\n')
-        self.sourcesFile = os.popen('ls -Sr /var/lib/apt/lists/ | grep -E "Sources$" | tail -n 1').read().rstrip('\n')
+        self.packagesFile = os.popen('ls -Sr /var/lib/apt/lists/ | grep -E "_main_.*Packages$" | tail -n 1').read().rstrip('\n')
+        self.sourcesFile = os.popen('ls -Sr /var/lib/apt/lists/ | grep -E "_main_.*Sources$" | tail -n 1').read().rstrip('\n')
         for f in os.walk('/var/lib/apt/lists').next()[2]:
             if f[-7:] == "Release" and self.packagesFile.startswith(f[:-7]):
                 self.releaseFile = f