Univention Bugzilla – Attachment #4929: Show packages that will be uninstalled when removing an application for bug #29273
self.component_manager.remove_app(application)
self.package_manager.update()
can_continue = False
elif can_continue and function in ('uninstall',) and not force:
result['remove'] = application.uninstall_dry_run(self.package_manager)
result['can_continue'] = can_continue
self.finished(request.id, result)
return result
def uninstall_dry_run(self, package_manager):
MODULE.info('Invoke uninstall_dry_run')
package_manager.reopen_cache()
to_uninstall = package_manager.get_packages(self.get('defaultpackages'))
for package in to_uninstall:
package.mark_delete()
packages = [pkg.name for pkg in package_manager.packages() if pkg.is_auto_removable]
return packages
def install(self, package_manager, component_manager, add_component=True):
try:
# remove all existing component versions