chore: exclude packages sections using tools/packages.py (#1499)

* feat: exclude packages sections using tools/packages.py

* chore: group apache deps packages in a section

This allow one to exlude the entire section and install nginx for example.
This commit is contained in:
Jonas L 2022-01-10 07:23:37 +01:00 committed by GitHub
parent 1b601e2ac1
commit 19986cf1b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 8 deletions

View file

@ -18,12 +18,14 @@ ffmpeg = buster, bionic, focal
result_buster = {"curl", "postgresql"}
result_bionic = {"apache2", "curl", "ffmpeg"}
result_focal = {"postgresql", "apache2", "ffmpeg"}
result_exclude = {"postgresql", "ffmpeg"}
def test_load_packages():
assert load_packages(PACKAGE_INI, "buster", False) == result_buster
assert load_packages(PACKAGE_INI, "bionic", True) == result_bionic
assert load_packages(PACKAGE_INI, "focal", True) == result_focal
assert load_packages(PACKAGE_INI, "focal", True, ["legacy"]) == result_exclude
def test_list_packages(tmp_path: Path):