Challenge APKINDEX.tar.gz: add logging

This commit is contained in:
Oliver Smith 2017-07-11 18:26:22 +02:00
parent 0bd1d54049
commit c3a4446166
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
2 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,7 @@ along with pmbootstrap. If not, see <http://www.gnu.org/licenses/>.
"""
import os
import glob
import logging
import pmb.parse.apkindex
@ -37,6 +38,8 @@ def apkindex(args, path_apkindex, apk_suffix=""):
# All listed packages must exist
found = []
count = str(len(content.items()))
logging.info("Check for existence of all listed packages (" + count + ")")
for pkgname_alias, block in content.items():
apk = (block["pkgname"] + "-" + block["version"] + ".apk" +
apk_suffix)
@ -52,6 +55,7 @@ def apkindex(args, path_apkindex, apk_suffix=""):
found.append(buildinfo)
# There must be no extra files
logging.info("Check for extra files")
for path in glob.glob(folder + "/*"):
name = os.path.basename(path)
if name == "APKINDEX.tar.gz" or name in found:

View File

@ -17,11 +17,13 @@ You should have received a copy of the GNU General Public License
along with pmbootstrap. If not, see <http://www.gnu.org/licenses/>.
"""
import os
import logging
import pmb.challenge
def frontend(args):
path = args.challenge_file
logging.info("Challenge " + path)
if path.endswith(".apk"):
pmb.challenge.build(args, path)
elif os.path.basename(path) == "APKINDEX.tar.gz":