forked from Mirror/pmbootstrap
pmb.build.is_necessary: tweak comments (MR 2295)
* Remove obvious / not helpful line: "# Get package name, version, define start of debug message" * Remove "old" in "Get old version from APKINDEX" because it may be newer than the version in pmaports * Replace "Aports [folder]" with pmaports (in some parts of pmbootstrap code, pmaports is still referred to as aports, this was one of them)
This commit is contained in:
parent
d55bc245d1
commit
21f70e9ba6
1 changed files with 3 additions and 4 deletions
|
@ -52,12 +52,11 @@ def is_necessary(args, arch, apkbuild, indexes=None):
|
||||||
:param indexes: list of APKINDEX.tar.gz paths
|
:param indexes: list of APKINDEX.tar.gz paths
|
||||||
:returns: boolean
|
:returns: boolean
|
||||||
"""
|
"""
|
||||||
# Get package name, version, define start of debug message
|
|
||||||
package = apkbuild["pkgname"]
|
package = apkbuild["pkgname"]
|
||||||
version_pmaports = apkbuild["pkgver"] + "-r" + apkbuild["pkgrel"]
|
version_pmaports = apkbuild["pkgver"] + "-r" + apkbuild["pkgrel"]
|
||||||
msg = "Build is necessary for package '" + package + "': "
|
msg = "Build is necessary for package '" + package + "': "
|
||||||
|
|
||||||
# Get old version from APKINDEX
|
# Get version from APKINDEX
|
||||||
index_data = pmb.parse.apkindex.package(args, package, arch, False,
|
index_data = pmb.parse.apkindex.package(args, package, arch, False,
|
||||||
indexes)
|
indexes)
|
||||||
if not index_data:
|
if not index_data:
|
||||||
|
@ -82,13 +81,13 @@ def is_necessary(args, arch, apkbuild, indexes=None):
|
||||||
version_binary, package))
|
version_binary, package))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# b) Aports folder has a newer version
|
# b) Local pmaports has a newer version
|
||||||
if version_pmaports != version_binary:
|
if version_pmaports != version_binary:
|
||||||
logging.debug(f"{msg}Binary package out of date (binary: "
|
logging.debug(f"{msg}Binary package out of date (binary: "
|
||||||
f"{version_binary}, aport: {version_pmaports})")
|
f"{version_binary}, aport: {version_pmaports})")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Aports and binary repo have the same version.
|
# Local pmaports and binary repo have the same version
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue