mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +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
|
Framework for installing and updating distribution packages
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
import subprocess
|
import subprocess
|
||||||
import threading
|
import threading
|
||||||
@ -183,3 +184,11 @@ def refresh_package_lists():
|
|||||||
"""To be run in case apt package lists are outdated."""
|
"""To be run in case apt package lists are outdated."""
|
||||||
transaction = Transaction(None, None)
|
transaction = Transaction(None, None)
|
||||||
transaction.refresh_package_lists()
|
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