desync
desync copied to clipboard
Having multiple dirs in an parent without files seems to be broken (when using tar)
When creating a tar with 2 dirs in an unpopulated parent directory using:
tar -cf - --sort name -C / --hard-dereference --one-file-system --sparse --exclude-vcs -v opt/dir2/ opt/dir1/ | desync tar -s http://localhost:9988/ -i http://localhost:9987/1.caidx --input-format=tar -
tar prints out the child paths as it should:
opt/dir1/...
opt/dir1/.buildinfo
opt/dir2/...
when querying the http server for the received mtree one of the directorys seems to be lost:
desync mtree -s http://127.0.0.1:9988/ -i http://localhost:9987/1.caidx
....
.buildinfo type=file mode=0644 ...
the information about opt and dir2 is completely missing, the resulting index only contains the child items of opt/dir1.
this happens with the build in index-server and chunk-server and also when specifying a local directory and a local caidx via commandline.
The issue here is that the tar file doesn't contain a full tree, which the casync format requires. Basically it needs a root (you can add that with --tar-add-root
), and the parent directories. In this case there has to be an opt
dir in the stream before any children of it.
I could try to generate the missing dirs, but that might have side-effects.