Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having multiple dirs in an parent without files seems to be broken (when using tar) #139

Open
cHolzberger opened this issue Dec 6, 2019 · 1 comment

Comments

@cHolzberger
Copy link

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.

@folbricht
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants