Make nonfree depends optional part 2: device pkgs (#1268)

* Add nonfree_firmware subpackage to all devices, that depend on
  nonfree firmware.
* Some packages were depending on `linux-firmware`, but without having
  Wifi working. Removed that dependency as it was probably added by
  accident. If it was really necessary, chosing the appropriate
  split linux-firmware package (e.g. linux-firmware-brcm) is better
  anyway (that has been changed recently in Alpine and is possible
  now).
* Add a test case that makes sure we don't have firmware depends
  without subpackages in device aports anymore.
This commit is contained in:
Oliver Smith 2018-02-26 22:11:44 +00:00 committed by GitHub
parent b6bf3176e2
commit ab2fde4fef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 236 additions and 66 deletions

View file

@ -50,11 +50,21 @@ def test_deviceinfo(args):
def test_aports_device(args):
"""
Require "postmarketos-base" to be in the device APKBUILD's depends.
Various tests performed on the /device/device-* aports.
"""
for path in glob.glob(args.aports + "/device/device-*/APKBUILD"):
apkbuild = pmb.parse.apkbuild(args, path)
# Depends: Require "postmarketos-base"
if "postmarketos-base" not in apkbuild["depends"]:
raise RuntimeError("Missing 'postmarketos-base' in depends of " +
path)
# Depends: Must not have firmware packages
for depend in apkbuild["depends"]:
if depend.startswith("firmware-") or depend == "linux-firmware":
raise RuntimeError("Firmware package '" + depend + "' found in"
" depends of " + path + ". These go into"
" subpackages now, see"
" <https://postmarketos.org/devicepkg>.")