diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-05-26 18:00:57 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-05-26 18:00:57 -0500 |
commit | 529a6a899ba55ca5e18c7329ef66a0e4d61592be (patch) | |
tree | 9462ba7c0a9be788242bf479fbe4d82ae03db728 | |
download | arch-tester-529a6a899ba55ca5e18c7329ef66a0e4d61592be.tar.gz arch-tester-529a6a899ba55ca5e18c7329ef66a0e4d61592be.tar.bz2 arch-tester-529a6a899ba55ca5e18c7329ef66a0e4d61592be.tar.xz arch-tester-529a6a899ba55ca5e18c7329ef66a0e4d61592be.zip |
Initial commit
-rw-r--r-- | arches | 4 | ||||
-rw-r--r-- | sys-specific | 13 | ||||
-rw-r--r-- | tester.py | 83 | ||||
-rw-r--r-- | user-specific | 2 |
4 files changed, 102 insertions, 0 deletions
@@ -0,0 +1,4 @@ +pmmx +ppc +ppc64 +x86_64 diff --git a/sys-specific b/sys-specific new file mode 100644 index 0000000..3c0d399 --- /dev/null +++ b/sys-specific @@ -0,0 +1,13 @@ +# Did not make it in all releases. +easy-kernel-4.14.12-mc3 + +# FTBFS on !x86_64 +mariadb + +android-tools +gnu-efi +grub-efi +powerpc-utils +syslinux +wine +xf86-video-intel diff --git a/tester.py b/tester.py new file mode 100644 index 0000000..c1f05c5 --- /dev/null +++ b/tester.py @@ -0,0 +1,83 @@ +#!/usr/bin/env python3 +# Adélie Linux architecture package tester +# Ensure all packages are all on arches +# +# Copyright © 2018 Adélie Linux team. All rights reserved. +# + +from apkkit.base.index import Index + +BASE_URL = "https://mirrormaster.adelielinux.org/adelie/{version}/{repo}/{arch}/APKINDEX.tar.gz" +"""The base URL to use for downloading package indexes.""" + +VERSION = "1.0-alpha6" +"""The version to check. Bump this after each release.""" + +def main(): + """The main function.""" + + arches = set() + sys_ign = set() + user_ign = set() + with open('arches', 'r') as arch_file: + arches = [arch[:-1] for arch in arch_file.readlines()] + with open('sys-specific', 'r') as ignore_file: + sys_ign = set(pkg[:-1] for pkg in ignore_file.readlines()) + with open('user-specific', 'r') as ignore_file: + user_ign = set(pkg[:-1] for pkg in ignore_file.readlines()) + + all_sys_pkgs = set() + all_user_pkgs = set() + pkgs = {} + + broken_sys = list() + broken_user = list() + not_broken = list() + + for arch in arches: + print("Loading " + arch + "...") + arch_sys = Index(url=BASE_URL.format(version=VERSION, repo='system', arch=arch)) + arch_user = Index(url=BASE_URL.format(version=VERSION, repo='user', arch=arch)) + + all_sys_pkgs = all_sys_pkgs.union(arch_sys.origins) + all_user_pkgs = all_user_pkgs.union(arch_user.origins) + + pkgs[arch] = {'system': arch_sys.origins, 'user': arch_user.origins} + + for pkg in sys_ign: + all_sys_pkgs.discard(pkg) + for pkg in user_ign: + all_user_pkgs.discard(pkg) + + for arch in arches: + missing_sys = all_sys_pkgs - pkgs[arch]['system'] + missing_user = all_user_pkgs - pkgs[arch]['user'] + + if len(missing_sys) > 0: + print("Missing in {arch}/system:".format(arch=arch)) + print("=========================") + missing = list(missing_sys) + missing.sort() + for pkg in missing: print(pkg) + print("\n\n") + broken_sys.append(arch) + + if len(missing_user) > 0: + print("Missing in {arch}/user:".format(arch=arch)) + print("=========================") + missing = list(missing_user) + missing.sort() + for pkg in missing: print(pkg) + print("\n\n") + broken_user.append(arch) + + if len(missing_sys) == 0 and len(missing_user) == 0: + not_broken.append(arch) + + print("\033[1;32mNo issues\033[1;0m: {a}".format(a=", ".join(not_broken))) + print("\033[1;33mMissing user\033[1;0m: {a}".format(a=", ".join(broken_user))) + print("\033[1;31mMissing system\033[1;0m: {a}".format(a=", ".join(broken_sys))) + +if __name__ == "__main__": + main() + diff --git a/user-specific b/user-specific new file mode 100644 index 0000000..e5c97cf --- /dev/null +++ b/user-specific @@ -0,0 +1,2 @@ +efibootmgr +efivar |