Example #1
0
    def revert_ignored_update(self, pkg: SoftwarePackage):
        manager = self._get_manager_for(pkg)

        if manager:
            manager.revert_ignored_update(pkg)

            if not pkg.is_update_ignored() and pkg.categories and 'updates_ignored' in pkg.categories:
                pkg.categories.remove('updates_ignored')
Example #2
0
    def ignore_update(self, pkg: SoftwarePackage):
        manager = self._get_manager_for(pkg)

        if manager:
            manager.ignore_update(pkg)

            if pkg.is_update_ignored():
                if pkg.categories is None:
                    pkg.categories = ['updates_ignored']
                elif 'updates_ignored' not in pkg.categories:
                    pkg.categories.append('updates_ignored')
Example #3
0
    def revert_ignored_update(self, pkg: SoftwarePackage):
        manager = self._get_manager_for(pkg)

        if manager:
            manager.revert_ignored_update(pkg)

            if not pkg.is_update_ignored(
            ) and pkg.categories and 'updates_ignored' in pkg.categories:
                if isinstance(pkg.categories, tuple):
                    pkg.categories = tuple(c for c in pkg.categories
                                           if c != 'updates_ignored')
                else:
                    pkg.categories.remove('updates_ignored')