mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
package: Helper method to filter packages that need conffile prompt
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
5b4aa1cda0
commit
c8b2ba8c99
@ -18,6 +18,7 @@
|
||||
Framework for installing and updating distribution packages
|
||||
"""
|
||||
|
||||
import json
|
||||
import logging
|
||||
import subprocess
|
||||
import threading
|
||||
@ -183,3 +184,11 @@ def refresh_package_lists():
|
||||
"""To be run in case apt package lists are outdated."""
|
||||
transaction = Transaction(None, None)
|
||||
transaction.refresh_package_lists()
|
||||
|
||||
|
||||
def filter_conffile_prompts(packages):
|
||||
"""Return a filtered list of packages that require conffile prompts."""
|
||||
response = actions.superuser_run(
|
||||
'packages',
|
||||
['filter-conffile-packages', '--packages'] + list(packages))
|
||||
return json.loads(response)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user