Don't crash on packages without merges ever (very few packages)

This commit is contained in:
Stephan Kulow 2022-11-01 19:30:41 +01:00
parent ab8120ca53
commit c94d13d74e
4 changed files with 8139 additions and 0 deletions

View File

@ -175,6 +175,10 @@ class TreeBuilder:
merge_before_last = last_merge
last_merge = factory_node
factory_node = factory_node.parent
# a package without requests
if not last_merge:
return
if merge_before_last:
# we need to find the last merged_into that didn't end nowhere
# and cut the rope there

8120
tests/fixtures/000update-repos-data.yaml vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
- commit: openSUSE:Factory/000update-repos/12.0
- commit: openSUSE:Factory/000update-repos/11.0
- commit: openSUSE:Factory/000update-repos/10.0
- commit: openSUSE:Factory/000update-repos/9.0
- commit: openSUSE:Factory/000update-repos/8.0
- commit: openSUSE:Factory/000update-repos/7.0
- commit: openSUSE:Factory/000update-repos/6.0
- commit: openSUSE:Factory/000update-repos/5.0
- commit: openSUSE:Factory/000update-repos/4.0
- commit: openSUSE:Factory/000update-repos/3.0
- commit: openSUSE:Factory/000update-repos/2.0
- commit: openSUSE:Factory/000update-repos/1.0

View File

@ -48,6 +48,9 @@ class TestTreeMethods(unittest.TestCase):
def test_corefreq_tree(self):
self.verify_package("CoreFreq")
def test_000update_repos_tree(self):
self.verify_package("000update-repos")
if __name__ == "__main__":
unittest.main()