Show More
@@ -85,13 +85,7 b' def upgraderepo(' | |||||
85 |
|
85 | |||
86 | format_upgrades = upgrade_actions.find_format_upgrades(repo) |
|
86 | format_upgrades = upgrade_actions.find_format_upgrades(repo) | |
87 | actions = upgrade_actions.determineactions( |
|
87 | actions = upgrade_actions.determineactions( | |
88 | repo, format_upgrades, repo.requirements, newreqs |
|
88 | repo, format_upgrades, optimizations, repo.requirements, newreqs | |
89 | ) |
|
|||
90 | actions.extend( |
|
|||
91 | o |
|
|||
92 | for o in sorted(optimizations) |
|
|||
93 | # determineactions could have added optimisation |
|
|||
94 | if o not in actions |
|
|||
95 | ) |
|
89 | ) | |
96 |
|
90 | |||
97 | removedreqs = repo.requirements - newreqs |
|
91 | removedreqs = repo.requirements - newreqs |
@@ -526,7 +526,9 b' def findoptimizations(repo):' | |||||
526 | return list(ALL_OPTIMISATIONS) |
|
526 | return list(ALL_OPTIMISATIONS) | |
527 |
|
527 | |||
528 |
|
528 | |||
529 | def determineactions(repo, format_upgrades, sourcereqs, destreqs): |
|
529 | def determineactions( | |
|
530 | repo, format_upgrades, optimizations, sourcereqs, destreqs | |||
|
531 | ): | |||
530 | """Determine upgrade actions that will be performed. |
|
532 | """Determine upgrade actions that will be performed. | |
531 |
|
533 | |||
532 | Given a list of improvements as returned by ``find_format_upgrades`` and |
|
534 | Given a list of improvements as returned by ``find_format_upgrades`` and | |
@@ -551,6 +553,8 b' def determineactions(repo, format_upgrad' | |||||
551 |
|
553 | |||
552 | newactions.append(d) |
|
554 | newactions.append(d) | |
553 |
|
555 | |||
|
556 | newactions.extend(o for o in sorted(optimizations) if o not in newactions) | |||
|
557 | ||||
554 | # FUTURE consider adding some optimizations here for certain transitions. |
|
558 | # FUTURE consider adding some optimizations here for certain transitions. | |
555 | # e.g. adding generaldelta could schedule parent redeltas. |
|
559 | # e.g. adding generaldelta could schedule parent redeltas. | |
556 |
|
560 |
General Comments 0
You need to be logged in to leave comments.
Login now