| |
@@ -28,17 +28,18 @@
|
| |
continue
|
| |
|
| |
if not arches or (variant_arches & arches) == variant_arches:
|
| |
- paths.extend(_collect_variant(compose, variant, dest, arch=None))
|
| |
+ paths.extend(_collect_variant(compose, variant, arch=None))
|
| |
else:
|
| |
for arch in variant_arches:
|
| |
if arch not in arches:
|
| |
continue
|
| |
- paths.extend(_collect_variant(compose, variant, dest, arch=arch))
|
| |
+ paths.extend(_collect_variant(compose, variant, arch=arch))
|
| |
|
| |
+ compose_path = compose.compose_path.rstrip('/')
|
| |
paths = _reduce(compose, paths)
|
| |
for parent, children in paths.iteritems():
|
| |
sources = sorted([os.path.join(parent, child) for child in children])
|
| |
- destination = os.path.join(dest, parent.replace(compose.compose_path, '').lstrip('/'))
|
| |
+ destination = os.path.join(dest, parent.replace(compose_path, '').lstrip('/'))
|
| |
_run_rsync(sources, destination, dry_run=dry_run, opts=rsync_opts)
|
| |
|
| |
if not dry_run:
|
| |
@@ -58,7 +59,7 @@
|
| |
shortcuts.run(cmd, stdout=True)
|
| |
|
| |
|
| |
- def _collect_variant(compose, variant, dest, arch=None):
|
| |
+ def _collect_variant(compose, variant, arch=None):
|
| |
"""Find all paths in a variant that should be copied.
|
| |
If arch is not specified, that means all paths, otherwise only paths
|
| |
defined for the arch will be copied.
|
| |
Fixes: https://pagure.io/compose-utils/issue/60