pmbootstrap-meow/pmb/helpers/lint.py
Oliver Smith f21c216a26
Cosmetic: use SPDX license header (!1877)
While at it, also remove unnecessary "#!/usr/bin/env python3" in files
that only get imported, and adjust other empty/comment lines in the
beginnings of the files for consistency.

This makes files easier to read, and makes the pmbootstrap codebase more
consistent with the build.postmarketos.org codebase.
2020-02-24 03:11:10 +03:00

21 lines
645 B
Python

# Copyright 2020 Danct12 <danct12@disroot.org>
# SPDX-License-Identifier: GPL-3.0-or-later
import logging
import pmb.chroot
import pmb.chroot.apk
import pmb.build
import pmb.helpers.run
import pmb.helpers.pmaports
def check(args, pkgname):
pmb.chroot.apk.install(args, ["atools"])
# Run apkbuild-lint on copy of pmaport in chroot
pmb.build.init(args)
pmb.build.copy_to_buildpath(args, pkgname)
logging.info("(native) linting " + pkgname + " with apkbuild-lint")
pmb.chroot.user(args, ["apkbuild-lint", "APKBUILD"],
check=False, output="stdout",
working_dir="/home/pmos/build")