diff --git a/bits_helpers/sync.py b/bits_helpers/sync.py index 18d59f76..2531f5ac 100644 --- a/bits_helpers/sync.py +++ b/bits_helpers/sync.py @@ -684,7 +684,7 @@ def fetch_symlinks(self, spec) -> None: # Exit without error in case we do not have any package published test -d "{remote_store}/{cvmfs_architecture}/Packages/{package}" || exit 0 mkdir -p "{workDir}/{links_path}" - for install_path in $(find "{remote_store}/{cvmfs_architecture}/Packages/{package}" -type d -mindepth 1 -maxdepth 1); do + for install_path in $(find "{remote_store}/{cvmfs_architecture}/Packages/{package}" -mindepth 1 -maxdepth 1 -type d); do full_version="${{install_path##*/}}" tarball={package}-$full_version.{architecture}.tar.gz pkg_hash=$(cat "${{install_path}}/.build-hash" || jq -r '.package.hash' <${{install_path}}/.meta.json) @@ -695,7 +695,7 @@ def fetch_symlinks(self, spec) -> None: # Create the dummy tarball, if it does not exists test -f "{workDir}/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash/$tarball" && continue mkdir -p "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}" - find "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version" ! -name etc -maxdepth 1 -mindepth 1 -exec ln -sf {} "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/" \\; + find "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version" -mindepth 1 -maxdepth 1 ! -name etc -exec ln -sf {{}} "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/" \; cp -fr "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version/etc" "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/etc" mkdir -p "{workDir}/TARS/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash" tar -C "{workDir}/INSTALLROOT/$pkg_hash" -czf "{workDir}/TARS/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash/$tarball" .