pmb.build.is_necessary(): Remove unused 'suffix' parameter

This commit is contained in:
Oliver Smith 2017-06-11 14:45:00 +02:00
parent 3a3dd8063f
commit 5f747bedcd
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
2 changed files with 7 additions and 6 deletions

View File

@ -65,13 +65,14 @@ def copy_to_buildpath(args, package, suffix="native"):
"/home/user/build"], suffix=suffix)
def is_necessary(args, suffix, carch, apkbuild):
def is_necessary(args, arch, apkbuild):
"""
Check if the package has already been built (because abuild's check
only works, if it is the same architecture!)
:param apkbuild: From pmb.parse.apkbuild()
:returns: Boolean
:param arch: package target architecture
:param apkbuild: from pmb.parse.apkbuild()
:returns: boolean
"""
# Get new version from APKBUILD
@ -81,7 +82,7 @@ def is_necessary(args, suffix, carch, apkbuild):
# Get old version from APKINDEX
version_old = None
index_data = pmb.parse.apkindex.read(args, package,
args.work + "/packages/" + carch + "/APKINDEX.tar.gz", False)
args.work + "/packages/" + arch + "/APKINDEX.tar.gz", False)
if index_data:
version_old = index_data["version"]

View File

@ -59,8 +59,8 @@ def package(args, pkgname, carch, force=False, recurse=True, buildinfo=False):
package(args, depend, carch)
# Skip already built versions
if not force and not pmb.build.is_necessary(args, suffix,
carch_buildenv, apkbuild):
if not force and not pmb.build.is_necessary(
args, carch_buildenv, apkbuild):
return
# Install build tools and makedepends