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) "/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 Check if the package has already been built (because abuild's check
only works, if it is the same architecture!) only works, if it is the same architecture!)
:param apkbuild: From pmb.parse.apkbuild() :param arch: package target architecture
:returns: Boolean :param apkbuild: from pmb.parse.apkbuild()
:returns: boolean
""" """
# Get new version from APKBUILD # Get new version from APKBUILD
@ -81,7 +82,7 @@ def is_necessary(args, suffix, carch, apkbuild):
# Get old version from APKINDEX # Get old version from APKINDEX
version_old = None version_old = None
index_data = pmb.parse.apkindex.read(args, package, 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: if index_data:
version_old = index_data["version"] 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) package(args, depend, carch)
# Skip already built versions # Skip already built versions
if not force and not pmb.build.is_necessary(args, suffix, if not force and not pmb.build.is_necessary(
carch_buildenv, apkbuild): args, carch_buildenv, apkbuild):
return return
# Install build tools and makedepends # Install build tools and makedepends