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
|
@ -18,7 +18,7 @@ along with pmbootstrap. If not, see <http://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import os
|
||||
|
||||
import time
|
||||
import pmb.helpers.run
|
||||
|
||||
|
||||
|
@ -60,6 +60,16 @@ def is_up_to_date(path_sources, path_target=None, lastmod_target=None):
|
|||
return lastmod_target >= lastmod_source
|
||||
|
||||
|
||||
def is_older_than(path, seconds):
|
||||
"""
|
||||
Check if a single file is older than a given amount of seconds.
|
||||
"""
|
||||
if not os.path.exists(path):
|
||||
return True
|
||||
lastmod = os.path.getmtime(path)
|
||||
return lastmod + seconds < time.time()
|
||||
|
||||
|
||||
def symlink(args, file, link):
|
||||
"""
|
||||
Checks if the symlink is already present, otherwise create it.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue