def disable_current_package(self):
        inst = self._enabled_packages_list
        item = inst.currentItem()
        codepath = str(item.text())
        pm = get_package_manager()

        dependency_graph = pm.dependency_graph()
        identifier = pm.get_package_by_codepath(codepath).identifier

        if dependency_graph.in_degree(identifier) > 0:
            rev_deps = dependency_graph.inverse_adjacency_list[identifier]
            debug.critical("Missing dependency",
                           ("There are other packages that depend on this:\n %s" %
                            "Please disable those first.") % rev_deps)
        else:
            pm.late_disable_package(codepath)
            self.invalidate_current_pipeline()
            # the old code that used to be here to update the lists
            # has been moved to package_removed
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/preferences.py/QPackagesWidget.disable_current_package/operator `+` -> `%`