本文整理汇总了Python中ubuntutweak.utils.package.AptWorker.remove_packages方法的典型用法代码示例。如果您正苦于以下问题:Python AptWorker.remove_packages方法的具体用法?Python AptWorker.remove_packages怎么用?Python AptWorker.remove_packages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ubuntutweak.utils.package.AptWorker
的用法示例。
在下文中一共展示了AptWorker.remove_packages方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: do_action_for_app
# 需要导入模块: from ubuntutweak.utils.package import AptWorker [as 别名]
# 或者: from ubuntutweak.utils.package.AptWorker import remove_packages [as 别名]
def do_action_for_app(self, pkgname, action_id, *args):
action_id = int(action_id)
if action_id == self.INSTALL_ACTION:
set_busy(self)
worker = AptWorker(self.get_toplevel(),
finish_handler=self.on_package_work_finished,
data={'parent': self})
worker.install_packages([pkgname])
self.update_action_button(self.INSTALLING_ACTION)
elif action_id == self.UNINSTALL_ACTION:
set_busy(self)
worker = AptWorker(self.get_toplevel(),
finish_handler=self.on_package_work_finished,
data={'parent': self})
worker.remove_packages([pkgname])
self.update_action_button(self.UNINSTALLING_ACTION)
elif action_id == self.UPDATE_ACTION:
set_busy(self)
worker = AptWorker(self.get_toplevel(),
finish_handler=self.on_update_work_finished,
data={'parent': self})
worker.update_cache()
self.update_action_button(self.UPDATING_ACTION)
示例2: clean_cruft
# 需要导入模块: from ubuntutweak.utils.package import AptWorker [as 别名]
# 或者: from ubuntutweak.utils.package.AptWorker import remove_packages [as 别名]
def clean_cruft(self, parent=None, cruft_list=[]):
set_busy(parent)
worker = AptWorker(parent,
finish_handler=self.on_clean_finished,
error_handler=self.on_error,
data=parent)
worker.remove_packages([cruft.get_package_name() for cruft in cruft_list])
示例3: on_install_finished
# 需要导入模块: from ubuntutweak.utils.package import AptWorker [as 别名]
# 或者: from ubuntutweak.utils.package.AptWorker import remove_packages [as 别名]
def on_install_finished(transaction, status, kwargs):
to_add, to_rm = kwargs['add_and_rm']
if to_rm:
worker = AptWorker(self.get_toplevel(),
finish_handler=self.on_package_work_finished,
data=kwargs)
worker.remove_packages(to_rm)
else:
self.on_package_work_finished(None, None, kwargs)
示例4: clean_cruft
# 需要导入模块: from ubuntutweak.utils.package import AptWorker [as 别名]
# 或者: from ubuntutweak.utils.package.AptWorker import remove_packages [as 别名]
def clean_cruft(self, parent, cruft_list):
set_busy(parent)
worker = AptWorker(parent, self.on_clean_finished, parent)
worker.remove_packages([cruft.get_package_name() for cruft in cruft_list])
示例5: on_clean_finished
# 需要导入模块: from ubuntutweak.utils.package import AptWorker [as 别名]
# 或者: from ubuntutweak.utils.package.AptWorker import remove_packages [as 别名]
def on_clean_finished(transaction, status, add_and_rm):
to_add, to_rm = add_and_rm
worker = AptWorker(self.get_toplevel(), self.on_package_work_finished, add_and_rm)
worker.remove_packages(to_rm)