pmb: Introduce support for "unmaintained" devices (MR 2018)

Unmaintained devices are device packages that:
  - Are known to be broken in some way without an active maintainer
    who can investigate how to fix it, or
  - Have not received any updates for a very long time, or
  - Are discouraged from using because they are just intended for testing.
    An example for this are ports using the downstream kernel for devices
    which have a mainline port that is working quite well.

Unmaintained devices are still built by bpo (otherwise it would not make
sense to keep them), but they do not show up in "pmbootstrap init".
However, it is possible to manually select them by entering the name.
pmbootstrap will warn in that case.

Unmaintained packages should have a # Unmaintained: <reason> comment
in the APKBUILD, this comment is displayed in "pmbootstrap init"
so that the user knows why the device should not be used unless they
know what they are doing.
This commit is contained in:
Minecrell 2021-01-30 13:21:12 +01:00 committed by Oliver Smith
parent 03b3b250a5
commit 7dc2e197d3
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
5 changed files with 35 additions and 3 deletions

View file

@ -23,14 +23,17 @@ def find_path(args, codename, file=''):
return g[0]
def list_codenames(args, vendor=None):
def list_codenames(args, vendor=None, unmaintained=True):
"""
Get all devices, for which aports are available
:param vendor: vendor name to choose devices from, or None for all vendors
:param unmaintained: include unmaintained devices
:returns: ["first-device", "second-device", ...]
"""
ret = []
for path in glob.glob(args.aports + "/device/*/device-*"):
if not unmaintained and '/unmaintained/' in path:
continue
device = os.path.basename(path).split("-", 1)[1]
if (vendor is None) or device.startswith(vendor + '-'):
ret.append(device)