748
748
# A helper to create package filtering radio button vocabulary.
749
749
NON_IGNORED = 'non-ignored'
751
750
HIGHER_VERSION_THAN_PARENT = 'higher-than-parent'
752
751
RESOLVED = 'resolved'
754
754
DEFAULT_PACKAGE_TYPE = NON_IGNORED
757
757
def make_package_type_vocabulary(parent_name, higher_version_option=False):
760
NON_IGNORED, NON_IGNORED, 'Non ignored packages'),
761
SimpleTerm(IGNORED, IGNORED, 'Ignored packages'),
762
SimpleTerm(RESOLVED, RESOLVED, "Resolved package differences")]
759
SimpleTerm(NON_IGNORED, NON_IGNORED, 'Non ignored packages'),
760
SimpleTerm(RESOLVED, RESOLVED, "Resolved package differences"),
761
SimpleTerm(ALL, ALL, 'All packages'),
763
763
if higher_version_option:
764
764
higher_term = SimpleTerm(
765
765
HIGHER_VERSION_THAN_PARENT,
766
766
HIGHER_VERSION_THAN_PARENT,
767
767
"Ignored packages with a higher version than in %s"
769
voc.insert(2, higher_term)
769
voc.insert(1, higher_term)
770
770
return SimpleVocabulary(tuple(voc))
1058
1058
package_type_dsd_status = {
1060
1060
DistroSeriesDifferenceStatus.NEEDS_ATTENTION,),
1061
IGNORED: DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT,
1062
1061
HIGHER_VERSION_THAN_PARENT: (
1063
1062
DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT),
1064
1063
RESOLVED: DistroSeriesDifferenceStatus.RESOLVED,
1064
ALL: DistroSeriesDifferenceStatus.items,
1067
1067
status = package_type_dsd_status[self.specified_package_type]