diff --git a/pmb/config/init.py b/pmb/config/init.py index ba9e741f..bf2d315c 100644 --- a/pmb/config/init.py +++ b/pmb/config/init.py @@ -404,9 +404,9 @@ def ask_for_device(args): if not pmb.helpers.cli.confirm(args, default=True): continue else: - # Unmaintained devices can be selected, but are not displayed + # Archived devices can be selected, but are not displayed devices = sorted(pmb.helpers.devices.list_codenames( - args, vendor, unmaintained=False)) + args, vendor, archived=False)) # Remove "vendor-" prefixes from device list codenames = [x.split('-', 1)[1] for x in devices] logging.info(f"Available codenames ({len(codenames)}): " + @@ -437,10 +437,10 @@ def ask_for_device(args): logging.info("Generating new aports for: {}...".format(device)) pmb.aportgen.generate(args, f"device-{device}") pmb.aportgen.generate(args, f"linux-{device}") - elif "/unmaintained/" in device_path: + elif "/archived/" in device_path: apkbuild = f"{device_path[:-len('deviceinfo')]}APKBUILD" - unmaintained = pmb.parse._apkbuild.unmaintained(apkbuild) - logging.info(f"WARNING: {device} is unmaintained: {unmaintained}") + archived = pmb.parse._apkbuild.archived(apkbuild) + logging.info(f"WARNING: {device} is archived: {archived}") if not pmb.helpers.cli.confirm(args): continue break diff --git a/pmb/helpers/devices.py b/pmb/helpers/devices.py index c6966c36..c08f6ad4 100644 --- a/pmb/helpers/devices.py +++ b/pmb/helpers/devices.py @@ -23,16 +23,16 @@ def find_path(args, codename, file=''): return g[0] -def list_codenames(args, vendor=None, unmaintained=True): +def list_codenames(args, vendor=None, archived=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 + :param archived: include archived devices :returns: ["first-device", "second-device", ...] """ ret = [] for path in glob.glob(args.aports + "/device/*/device-*"): - if not unmaintained and '/unmaintained/' in path: + if not archived and '/archived/' in path: continue device = os.path.basename(path).split("-", 1)[1] if (vendor is None) or device.startswith(vendor + '-'): diff --git a/pmb/parse/_apkbuild.py b/pmb/parse/_apkbuild.py index 650926ac..c284c70a 100644 --- a/pmb/parse/_apkbuild.py +++ b/pmb/parse/_apkbuild.py @@ -436,15 +436,15 @@ def maintainers(path): return maintainers -def unmaintained(path): +def archived(path): """ - Return if (and why) an APKBUILD might be unmaintained. This should be - defined using a # Unmaintained: tag in the APKBUILD. + Return if (and why) an APKBUILD might be archived. This should be + defined using a # Archived: tag in the APKBUILD. :param path: full path to the APKBUILD - :returns: reason why APKBUILD is unmaintained, or None + :returns: reason why APKBUILD is archived, or None """ - unmaintained = _parse_comment_tags(read_file(path), 'Unmaintained') - if not unmaintained: + archived = _parse_comment_tags(read_file(path), 'Archived') + if not archived: return None - return '\n'.join(unmaintained) + return '\n'.join(archived) diff --git a/test/test_parse_apkbuild.py b/test/test_parse_apkbuild.py index 8004253a..4fcf5099 100644 --- a/test/test_parse_apkbuild.py +++ b/test/test_parse_apkbuild.py @@ -155,10 +155,10 @@ def test_parse_maintainers(args): assert pmb.parse._apkbuild.maintainers(path) == maintainers -def test_parse_unmaintained(args): +def test_parse_archived(args): path = (f"{pmb_test.const.testdata}/apkbuild" "/APKBUILD.missing-pkgdesc-in-subpackage") - assert pmb.parse._apkbuild.unmaintained(path) == "This is broken!" + assert pmb.parse._apkbuild.archived(path) == "This is broken!" def test_weird_pkgver(args): diff --git a/test/testdata/apkbuild/APKBUILD.missing-pkgdesc-in-subpackage b/test/testdata/apkbuild/APKBUILD.missing-pkgdesc-in-subpackage index 280da8ed..41cf536f 100644 --- a/test/testdata/apkbuild/APKBUILD.missing-pkgdesc-in-subpackage +++ b/test/testdata/apkbuild/APKBUILD.missing-pkgdesc-in-subpackage @@ -1,5 +1,5 @@ # Reference: -# Unmaintained: This is broken! +# Archived: This is broken! pkgname="missing-pkgdesc-in-subpackage" arch="noarch" subpackages="$pkgname-subpackage invalid-function:does_not_exist"