Optionally do old_compose per release type

This would make sure that e.g. "updates" composes don't try to use "updates-testing" as an
old_compose_path, which would create practically useless deltarpms and for no repodata
reuse at all.

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This commit is contained in:
Patrick Uiterwijk 2017-11-06 14:56:08 +01:00
parent 385002fe94
commit 1a10a1fe83
5 changed files with 33 additions and 3 deletions

View file

@ -253,6 +253,16 @@ class TestFindOldCompose(unittest.TestCase):
old = util.find_old_compose(self.tmp_dir, 'Fedora', 'Rawhide')
self.assertEqual(old, self.tmp_dir + '/Fedora-Rawhide-20160229.1')
def test_find_correct_type(self):
touch(self.tmp_dir + '/Fedora-26-updates-20160229.0/STATUS', 'FINISHED')
touch(self.tmp_dir + '/Fedora-26-updates-testing-20160229.0/STATUS', 'FINISHED')
old = util.find_old_compose(self.tmp_dir, 'Fedora', '26', '-updates')
self.assertEqual(old, self.tmp_dir + '/Fedora-26-updates-20160229.0')
old = util.find_old_compose(self.tmp_dir, 'Fedora', '26', '-updates-testing')
self.assertEqual(old, self.tmp_dir + '/Fedora-26-updates-testing-20160229.0')
old = util.find_old_compose(self.tmp_dir, 'Fedora', '26')
self.assertEqual(old, self.tmp_dir + '/Fedora-26-updates-testing-20160229.0')
def test_find_latest_with_two_digit_respin(self):
touch(self.tmp_dir + '/Fedora-Rawhide-20160228.n.9/STATUS', 'FINISHED')
touch(self.tmp_dir + '/Fedora-Rawhide-20160228.n.10/STATUS', 'FINISHED')