aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/utils/uhd_images_downloader.py.in10
1 files changed, 4 insertions, 6 deletions
diff --git a/host/utils/uhd_images_downloader.py.in b/host/utils/uhd_images_downloader.py.in
index 9fb660e5a..73a29bad5 100644
--- a/host/utils/uhd_images_downloader.py.in
+++ b/host/utils/uhd_images_downloader.py.in
@@ -173,7 +173,7 @@ def lookup_urls(regex, manifest, inventory, refetch=False):
filename = os.path.basename(target_url)
if not refetch and inventory.get(filename, {}).get("repo_hash", "") == target_hash:
# We already have this file, we don't need to download it again
- log("TRACE", "Selected target already downloaded- skipping.")
+ log("INFO", "Target {} is up to date.".format(target))
else:
# We don't have that exact file, add it to the list
selected_targets.append({"repo_hash": target_hash,
@@ -272,6 +272,8 @@ def main():
global _LOG_LEVEL
log("TRACE", "Default log level: {}".format(_LOG_LEVEL))
_LOG_LEVEL = _LOG_LEVEL - args.verbose + args.quiet
+ images_dir = args.install_location
+ log("INFO", "Images destination: {}".format(os.path.abspath(images_dir)))
try:
# If we're given a path to a manifest file, use it
if os.path.exists(args.manifest_location):
@@ -325,14 +327,10 @@ def main():
"\n".join("{}".format(item) for item in target_urls)
))
else:
- log("INFO", "No targets selected. Exiting.")
return 0
with TemporaryDirectory() as temp_dir:
# Now download all the images archives into a temp directory
- images_dir = args.install_location
- log("INFO", "Images destination: {}".format(os.path.abspath(images_dir)))
- log("INFO", "Starting download. Run with -v to see download progress bars.")
for target_info in targets_info:
target_hash = target_info.get("repo_hash")
target_rel_url = target_info.get("url")
@@ -346,7 +344,7 @@ def main():
images_url=full_url,
filename=temp_path,
buffer_size=args.buffer_size,
- print_progress=(_LOG_LEVEL <= _LOG_LEVELS.get("DEBUG", 2))
+ print_progress=(_LOG_LEVEL <= _LOG_LEVELS.get("INFO", 3))
)
if downloaded_sha256 != target_sha256:
log("ERROR", "Downloaded SHA256 does not match manifest for {}!".format(