Pull request #186: Various small changes
Merge in ICO/coreos from various_small_changes to master * commit 'a0910ef3ff70a53ea410ba205e36a2f5620481b3': chore(submodules): update third-party submodules feat(coreos-supportd-pkgs): create list of CoreOS supported packages chore(belden-coreos): move the initial timestamp to a generic file fix(swupdate): add libgcc as a dependency to terminate swupdate correctly feat(eagle40-03): strip out unused MACHINE_FEATURES for eagle40-03
This commit is contained in:
commit
fc389b0543
|
|
@ -1 +1 @@
|
||||||
Subproject commit b187fb9232ca0a6b5f8f90b4715958546fc41d73
|
Subproject commit d7b7b6fb6c7c5545e718e44f38853d1718ce5446
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 228b24895f951bab648a21d084f42dc66599927c
|
Subproject commit 09d2f9391813674627ec53cb222da6c7a51221e6
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit fda737ec0cc1d2a5217548a560074a8e4d5ec580
|
Subproject commit 8bb16533532b6abc2eded7d9961ab2a108fd7a5b
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit eaa4dcbac224c9f5e7da784dcda78b67f117cf63
|
Subproject commit 3d12b2788a45d86efcb1ad3e01f209558c54795c
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7902664f89678164b7fc90d421cee74cbec51cdf
|
Subproject commit cb2bc17e96552cdfc141d27bd9f4dbd95a872846
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit d63af11e92094487d6e358f27283e5385937e7a8
|
Subproject commit 1b5405955c7c2579ed1f52522e2e177d0281fa33
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
require include/coreos-generic-arch/x64.inc
|
require include/coreos-generic-arch/x64.inc
|
||||||
|
|
||||||
MACHINE_FEATURES += "pci usbhost x86 acpi serial efi tpm2 "
|
MACHINE_FEATURES += "pci usbhost x86 serial efi"
|
||||||
|
|
||||||
# Kernel configuration
|
# Kernel configuration
|
||||||
# ******************************************************************************
|
# ******************************************************************************
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,3 @@ MAINTAINER = "Belden CoreOS Team"
|
||||||
|
|
||||||
DISTRO_VERSION = "0.0.1"
|
DISTRO_VERSION = "0.0.1"
|
||||||
DISTRO_CODENAME = "kirkstone"
|
DISTRO_CODENAME = "kirkstone"
|
||||||
|
|
||||||
# This TS represents 01.01.2024 generating it dynamically would cause a lot of
|
|
||||||
# things to get re-build, we need a good solution for this or change it every
|
|
||||||
# year
|
|
||||||
REPRODUCIBLE_TIMESTAMP_ROOTFS = "1704067200"
|
|
||||||
|
|
@ -111,3 +111,8 @@ PACKAGECONFIG:pn-systemd ?= " \
|
||||||
# Distro based on CoreOS can provide their own configuration files for the
|
# Distro based on CoreOS can provide their own configuration files for the
|
||||||
# CoreOS installer by overriding this variable
|
# CoreOS installer by overriding this variable
|
||||||
PREFERRED_PROVIDER_coreos-installer-config ??= "coreos-installer-config"
|
PREFERRED_PROVIDER_coreos-installer-config ??= "coreos-installer-config"
|
||||||
|
|
||||||
|
# This TS represents 01.01.2024 generating it dynamically would cause a lot of
|
||||||
|
# things to get re-build, we need a good solution for this or change it every
|
||||||
|
# year
|
||||||
|
REPRODUCIBLE_TIMESTAMP_ROOTFS = "1704067200"
|
||||||
|
|
@ -0,0 +1,149 @@
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-acl = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-arptables = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-attr = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-autoconf-archive = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-base-files = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-base-passwd = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-bash-completion = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-bash = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-binutils-cross-x86_64 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-boost = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-bridge-utils = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-busybox = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-bzip2 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-ca-certificates = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-conntrack-tools = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-coreutils = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-cppzmq = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-cracklib = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-cryptsetup = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-curl = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-dbus = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-depmodwrapper-cross = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-e2fsprogs = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-ebtables = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-efibootguard = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-elfutils = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-ethtool = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-expat = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-findutils = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-flatbuffers = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-flex = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-fmt = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-gawk = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-gcc-cross-x86_64 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-gcc-runtime = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-gcc-source-11.4.0 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-gdbm = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-glib-2.0 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-glibc = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-glibc-locale = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-gmp = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-gnu-efi = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-gnutls = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-grub-bootconf = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-grub = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-grub-efi = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-icu = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-iproute2 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-iptables = "Team CoreOS"
|
||||||
|
#iw should be removed
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-json-c = "Team CoreOS"
|
||||||
|
# kbd check if it can be removed
|
||||||
|
# kmod check if it can be removed
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libaio = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libarchive = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libcap = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libcap-ng = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libcheck = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libconfig = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libdevmapper = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libestr = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libfastjson = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libffi = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libgcc = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libgcc-initial = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libgcrypt = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libgpg-error = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libidn2 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-liblogging = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libmnl = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libnet = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libnetfilter-conntrack = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libnetfilter-cthelper = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libnetfilter-cttimeout = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libnetfilter-log = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libnetfilter-queue = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libnfnetlink = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libnl = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libnsl2 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libpam = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libpcap = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libpcre = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libseccomp = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libsodium = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libsolv = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libssh2 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libssh = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libtirpc = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libtool-cross = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libunistring = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libusb1 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libxcrypt = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-libxml2 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-linux-libc-headers = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-linux-yocto = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-logrotate = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-lrzsz = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-lvm2 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-lzo = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-m4 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-mtools = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-ncurses = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-netbase = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-nettle = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-openssh = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-openssl = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-opkg-arch-config = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-opkg = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-opkg-utils = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-os-release = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-packagegroup-base = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-packagegroup-core-boot = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-packagegroup-coreos-base = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-packagegroup-coreos-boot = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-pciutils = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-perl = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-popt = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-python3 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-qemuwrapper-cross = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-readline = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-rsyslog = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-run-postinsts = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-secure-storage = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-setserial = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-sh = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-shared-mime-info = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-spdlog = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-sqlite3 = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-swupdate = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-sysfsutils = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-syslinux = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-syslog-ng = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-systemd-bootconf = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-systemd-boot = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-systemd-conf = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-systemd = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-systemd-serialgetty = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-tar = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-tcpdump = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-usbutils = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-util-linux = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-util-linux-libuuid = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-volatile-binds = "Team CoreOS"
|
||||||
|
# wpa-supplicant should be removed
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-xz = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-zeromq = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-zip = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-zlib = "Team CoreOS"
|
||||||
|
COREOS_RECIPE_MAINTAINER:pn-zstd = "Team CoreOS"
|
||||||
|
|
@ -48,3 +48,6 @@ do_install:append() {
|
||||||
install -m 755 ${COREOS_EFI_SECUREBOOT_KEYDIR}/swupdate.crt ${D}${libdir}/swupdate/
|
install -m 755 ${COREOS_EFI_SECUREBOOT_KEYDIR}/swupdate.crt ${D}${libdir}/swupdate/
|
||||||
echo "${MACHINE} 1.0" > ${D}${sysconfdir}/hwrevision
|
echo "${MACHINE} 1.0" > ${D}${sysconfdir}/hwrevision
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Fix: libgcc_s.so.1 must be installed for pthread_exit to work
|
||||||
|
RDEPENDS:${PN} += "libgcc"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,164 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
# Copyright (C) 2023 Hirschmann Automation and Control GmbH
|
||||||
|
#
|
||||||
|
# - list all recipes that are supported by the CoreOS team
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import optparse
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
|
scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0])))
|
||||||
|
# Add the path if we have own libs
|
||||||
|
lib_path = os.path.abspath(scripts_path + '/../lib')
|
||||||
|
sys.path = sys.path + [lib_path]
|
||||||
|
# Add the OE lib path
|
||||||
|
lib_path = os.path.abspath(scripts_path + '/../external-layers/openembedded-core/scripts/lib')
|
||||||
|
sys.path = sys.path + [lib_path]
|
||||||
|
|
||||||
|
import scriptpath
|
||||||
|
|
||||||
|
# For importing the following modules
|
||||||
|
bitbakepath = scriptpath.add_bitbake_lib_path()
|
||||||
|
if not bitbakepath:
|
||||||
|
sys.stderr.write("Unable to find bitbake by searching parent directory of this script or PATH\n")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
import bb.cooker
|
||||||
|
import bb.providers
|
||||||
|
import bb.tinfoil
|
||||||
|
from pprint import pprint
|
||||||
|
|
||||||
|
def get_fnlist(bbhandler, pkg_pn):
|
||||||
|
''' Get all recipe file names '''
|
||||||
|
(latest_versions, preferred_versions, required_versions) = bb.providers.findProviders(bbhandler.config_data, bbhandler.cooker.recipecaches[''], pkg_pn)
|
||||||
|
|
||||||
|
fn_list = []
|
||||||
|
for pn in sorted(pkg_pn):
|
||||||
|
# use the preferred version
|
||||||
|
fn_list.append(preferred_versions[pn][1])
|
||||||
|
|
||||||
|
return fn_list
|
||||||
|
|
||||||
|
|
||||||
|
def get_recipesdata(bbhandler):
|
||||||
|
''' Get data of all available recipes '''
|
||||||
|
pkg_pn = bbhandler.cooker.recipecaches[''].pkg_pn
|
||||||
|
|
||||||
|
pkg_dict = {}
|
||||||
|
supported_pkg_dict = {}
|
||||||
|
fn_list = get_fnlist(bbhandler, pkg_pn)
|
||||||
|
size = str(len(fn_list))
|
||||||
|
i = 0
|
||||||
|
for fn in fn_list:
|
||||||
|
print(size + "/" + str(i))
|
||||||
|
i += 1
|
||||||
|
data = bbhandler.parse_recipe_file(fn)
|
||||||
|
maintainer = data.getVar("COREOS_RECIPE_MAINTAINER")
|
||||||
|
pn = data.getVar("PN")
|
||||||
|
packages = data.getVar("PACKAGES")
|
||||||
|
packages += data.getVar("PROVIDES")
|
||||||
|
pkg_dict[pn] = data
|
||||||
|
if maintainer:
|
||||||
|
supported_pkg_dict[pn] = data
|
||||||
|
for pkg in packages.split():
|
||||||
|
pkg_dict[pkg] = data
|
||||||
|
if maintainer:
|
||||||
|
supported_pkg_dict[pkg] = data
|
||||||
|
|
||||||
|
return pkg_dict, supported_pkg_dict
|
||||||
|
|
||||||
|
def resolve_dependencies(pkg_dict, supported_pkg_dict):
|
||||||
|
''' Resolve dependencies and add them to supported packages '''
|
||||||
|
sup_with_dep_dict = {}
|
||||||
|
for pkg in supported_pkg_dict:
|
||||||
|
depends = supported_pkg_dict[pkg].getVar("DEPENDS") or ''
|
||||||
|
rdepends = supported_pkg_dict[pkg].getVar("RDEPENDS") or ''
|
||||||
|
sup_with_dep_dict[pkg] = pkg_dict[pkg]
|
||||||
|
|
||||||
|
for d_pkg in depends.split():
|
||||||
|
if ("virtual/" in d_pkg) or ("native" in d_pkg):
|
||||||
|
continue
|
||||||
|
sup_with_dep_dict[d_pkg] = pkg_dict[d_pkg]
|
||||||
|
|
||||||
|
for r_pkg in rdepends.split():
|
||||||
|
if ("virtual/" in r_pkg) or ("native" in r_pkg):
|
||||||
|
continue
|
||||||
|
sup_with_dep_dict[r_pkg] = pkg_dict[r_pkg]
|
||||||
|
|
||||||
|
return sup_with_dep_dict
|
||||||
|
|
||||||
|
|
||||||
|
def display(supported_pkg_dict):
|
||||||
|
''' Display all pkgs and COREOS_RECIPE_MAINTAINER information '''
|
||||||
|
print(f'{str("RECIPE NAMES:"):40} {str("META-LAYER:"):40} {str("COS-MAINTAINER:"):50}')
|
||||||
|
for pn in supported_pkg_dict:
|
||||||
|
recipe_name = supported_pkg_dict[pn].getVar("P")
|
||||||
|
recipe_path = supported_pkg_dict[pn].getVar("FILE")
|
||||||
|
meta_layer = re.search("(?<=/layers/)(.*)(?=/recipe)", recipe_path).group(0)
|
||||||
|
maintainer = supported_pkg_dict[pn].getVar("COREOS_RECIPE_MAINTAINER") or 'Supported by Dependency'
|
||||||
|
|
||||||
|
print(f'{recipe_name:40} {meta_layer:40} {maintainer:50}')
|
||||||
|
|
||||||
|
|
||||||
|
def get_unique_list(supported_pkg_dict):
|
||||||
|
''' Create a list that only contains one package based on PN '''
|
||||||
|
unique_dict = {}
|
||||||
|
for pkg in supported_pkg_dict:
|
||||||
|
pn = supported_pkg_dict[pkg].getVar("P")
|
||||||
|
unique_dict[pn] = supported_pkg_dict[pkg]
|
||||||
|
|
||||||
|
return unique_dict
|
||||||
|
|
||||||
|
def print_to_file(supported_pkg_dict, file):
|
||||||
|
''' print list to a file '''
|
||||||
|
with open(file, "w") as file:
|
||||||
|
file.write(f'{str("RECIPE NAMES:"):40} {str("META-LAYER:"):40} {str("COS-MAINTAINER:"):50}\n')
|
||||||
|
for pn in supported_pkg_dict:
|
||||||
|
recipe_name = supported_pkg_dict[pn].getVar("P")
|
||||||
|
recipe_path = supported_pkg_dict[pn].getVar("FILE")
|
||||||
|
meta_layer = re.search("(?<=/layers/)(.*)(?=/recipe)", recipe_path).group(0)
|
||||||
|
maintainer = supported_pkg_dict[pn].getVar("COREOS_RECIPE_MAINTAINER") or 'Supported by Dependency'
|
||||||
|
|
||||||
|
file.write(f'{recipe_name:40} {meta_layer:40} {maintainer:50}\n')
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = optparse.OptionParser(
|
||||||
|
description = "Lists all recipes supported by CoreOS.",
|
||||||
|
usage = """
|
||||||
|
%prog [options]""")
|
||||||
|
|
||||||
|
parser.add_option("-p", "--print",
|
||||||
|
help = "print all recipes that are supported",
|
||||||
|
action="store_const", dest="print", default=True)
|
||||||
|
parser.add_option("-f", "--file",
|
||||||
|
help = "store in file",
|
||||||
|
action="store", dest="file", type="string")
|
||||||
|
|
||||||
|
options, args = parser.parse_args(sys.argv)
|
||||||
|
|
||||||
|
with bb.tinfoil.Tinfoil() as bbhandler:
|
||||||
|
bbhandler.prepare()
|
||||||
|
print("Gathering recipe data...")
|
||||||
|
pkg_dict, supported_pkg_dict = get_recipesdata(bbhandler)
|
||||||
|
new_len = len(supported_pkg_dict)
|
||||||
|
old_len = 0
|
||||||
|
|
||||||
|
while old_len != new_len:
|
||||||
|
supported_pkg_dict = resolve_dependencies(pkg_dict, supported_pkg_dict)
|
||||||
|
old_len = new_len
|
||||||
|
new_len = len(supported_pkg_dict)
|
||||||
|
|
||||||
|
unique_dict = get_unique_list(supported_pkg_dict)
|
||||||
|
supported_pkg_dict = unique_dict
|
||||||
|
|
||||||
|
if options.print:
|
||||||
|
display(supported_pkg_dict)
|
||||||
|
|
||||||
|
if options.file:
|
||||||
|
print_to_file(supported_pkg_dict, options.file)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
Loading…
Reference in New Issue