예제 #1
0
    def refresh(self):
        super().refresh()
        threadMgr.wait(THREAD_PAYLOAD)

        # Create a new software selection cache.
        self._selection_cache = SoftwareSelectionCache(self._dnf_manager)
        self._selection_cache.apply_selection_data(self._selection)

        # Refresh up the UI.
        self._refresh_environments()
        self._refresh_groups()

        # Set up the info bar.
        self.clear_info()

        if self._errors:
            self.set_warning(_(
                "Error checking software dependencies. "
                " <a href=\"\">Click for details.</a>"
            ))
        elif self._warnings:
            self.set_warning(_(
                "Warning checking software dependencies. "
                " <a href=\"\">Click for details.</a>"
            ))
예제 #2
0
    def __init__(self, data, storage, payload):
        super().__init__(data, storage, payload)
        self.title = N_("Software selection")
        self._container = None
        self.errors = []
        self._tx_id = None

        # Get the packages configuration.
        self._selection_cache = SoftwareSelectionCache(self._dnf_manager)

        # Are we taking values (package list) from a kickstart file?
        self._kickstarted = flags.automatedInstall and self.payload.proxy.PackagesKickstarted
예제 #3
0
    def setup(self, args):
        """Set up the spoke right before it is used."""
        super().setup(args)

        # Wait for the payload to be ready.
        threadMgr.wait(THREAD_SOFTWARE_WATCHER)
        threadMgr.wait(THREAD_PAYLOAD)

        # Create a new software selection cache.
        self._selection_cache = SoftwareSelectionCache(self._dnf_manager)
        self._selection_cache.apply_selection_data(self._selection)

        return True
예제 #4
0
    def setUp(self):
        """Set up the test."""
        self.environment_data = CompsEnvironmentData()
        self.environment_data.id = "e1"
        self.environment_data.optional_groups = ["g1", "g2", "g3", "g4", "g5"]

        self.dnf_manager = Mock(spec=DNFManager)

        self.dnf_manager.resolve_environment.return_value = True
        self.dnf_manager.get_environment_data.return_value = self.environment_data

        self.dnf_manager.get_group_data.side_effect = self._get_group_data
        self.dnf_manager.resolve_group.return_value = True

        self.cache = SoftwareSelectionCache(self.dnf_manager)
예제 #5
0
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self._errors = []
        self._warnings = []
        self._tx_id = None

        # Get the packages selection data.
        self._selection_cache = SoftwareSelectionCache(self._dnf_manager)
        self._kickstarted = flags.automatedInstall and self.payload.proxy.PackagesKickstarted

        # Get the UI elements.
        self._environment_list_box = self.builder.get_object(
            "environmentListBox")
        self._addon_list_box = self.builder.get_object("addonListBox")

        # Connect viewport scrolling with listbox focus events
        environment_viewport = self.builder.get_object("environmentViewport")
        self._environment_list_box.set_focus_vadjustment(
            Gtk.Scrollable.get_vadjustment(environment_viewport))

        addon_viewport = self.builder.get_object("addonViewport")
        self._addon_list_box.set_focus_vadjustment(
            Gtk.Scrollable.get_vadjustment(addon_viewport))