diff --git a/package_release.py b/package_release.py index 8cac11eaae24b2c1578e0d2fb57967a48edcc413..05644aa7c8f2521f4da5377e6e941a023d9bafe4 100755 --- a/package_release.py +++ b/package_release.py @@ -40,25 +40,25 @@ def main(): # Set directories (use relative path) release_name = "GUF-Yocto-%s" % version output_dir = "%s/%s/%s" % (args.release_dir, release_name, machine) - images_dir = os.path.relpath(args.images_dir, output_dir) + images_dir_relative = os.path.relpath(args.images_dir, output_dir) # Create output directory os.makedirs(output_dir, exist_ok=True) - # Create symlinks for all artifacts + # Create symlinks for all images (to reduce size and network load) for artifact in artifacts_image: - source_file = "%s/%s" % (images_dir, artifact) + source_file = "%s/%s" % (images_dir_relative, artifact) target_file = "%s/%s" % (output_dir, artifact) - print("%s -> %s" % (target_file, source_file)) + print("Create link: %s -> %s" % (target_file, source_file)) os.symlink(source_file, target_file) - # Create symlinks for all artifacts + # Copy all other artifacts for artifact in artifacts_all: if artifact in artifacts_image: continue - source_file = "%s/%s" % (images_dir, artifact) + source_file = "%s/%s" % (args.images_dir, artifact) target_file = "%s/%s" % (output_dir, artifact) - print("%s -> %s" % (target_file, source_file)) + print("Copy: %s -> %s" % (target_file, source_file)) shutil.copyfile(source_file, target_file, follow_symlinks=True)