forked from Mirror/pmbootstrap
* add my own build key * enable the repo in the config * update the README file * Adjust testcase, that validates the keys and enable it in testcases_fast.sh * Only save/load keys to/from the config file, which we ask for during 'pmbootstrap init', so the binary repo gets used even if a config file already exists (this also removes a workaround, that deletes the work folder path from the config dictionary before writing it) * Download missing APKINDEX.tar.gz files with Python code, before attempting to build packages (so we know which ones aleady exist in the binary packages repository) * Consider APKINDEX files older than 4 hours as outdated and download them again (also in Python code) * Provide 'pmbootstrap update' to force-update the APKINDEX files * Travis: more logging output on failure * Only allow keys from config_keys to be used by "pmbootstrap config"
This commit is contained in:
parent
94e2387af5
commit
a7b881e4cc
18 changed files with 352 additions and 41 deletions
|
@ -24,7 +24,7 @@ import urllib.request
|
|||
import pmb.helpers.run
|
||||
|
||||
|
||||
def download(args, url, prefix, cache=True):
|
||||
def download(args, url, prefix, cache=True, loglevel=logging.INFO):
|
||||
"""
|
||||
Download a file to disk.
|
||||
"""
|
||||
|
@ -42,7 +42,7 @@ def download(args, url, prefix, cache=True):
|
|||
pmb.helpers.run.user(args, ["rm", path])
|
||||
|
||||
# Download the file
|
||||
logging.info("Download " + url)
|
||||
logging.log(loglevel, "Download " + url)
|
||||
with urllib.request.urlopen(url) as response:
|
||||
with open(path, "wb") as handle:
|
||||
shutil.copyfileobj(response, handle)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue