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

Libzim should support alias creation. #824

Closed
mgautierfr opened this issue Sep 27, 2023 · 5 comments · Fixed by #833
Closed

Libzim should support alias creation. #824

mgautierfr opened this issue Sep 27, 2023 · 5 comments · Fixed by #833
Assignees
Milestone

Comments

@mgautierfr
Copy link
Collaborator

For kiwix/overview#95

We need to be able to create entries pointing to the same data.

@mgautierfr mgautierfr self-assigned this Sep 27, 2023
@kelson42 kelson42 added this to the 10.0.0 milestone Sep 27, 2023
@kelson42
Copy link
Contributor

@rgaudin @mgautierfr We are agree on the principle of implementing this. The sooner its done the better. It seems to me the fix in the creator should be pretty simple.

Still I have a doubt about the naming of "alias", because "alias" implies it is a name with less value than the original one. Here this would not be the case. Maybe if we can avoid the usage of this terminology it would be better. Otherwise "hardlink", like on the filesystem, seems to me to be better naming.

Probably the specification needs to be updated as well to clearly explain this is possible (even if it was not written is wasn't so far).

@rgaudin
Copy link
Member

rgaudin commented Oct 23, 2023

I think hardlink carries more unwanted expectations with regards to modifications and de-duplication.
Anyway, it's a libzim feature that will be documented in spec and in the docstrings of the lib(s) so both alias, hardlink or whatever @mgautierfr might find more appropriate while implementing should be fine.

@rgaudin
Copy link
Member

rgaudin commented Oct 23, 2023

Should we already open a ticket on zimcheck to remind us that zimcheck will need to be updated? Actually, it opens some questions like: will libzim automatically remap entries with duplicate content as aliases?

@mgautierfr
Copy link
Collaborator Author

I agree with the naming question. I was asking myself if alias was a good name. I was thinking of hardlink too. I have no final answer for now.

Should we already open a ticket on zimcheck to remind us that zimcheck will need to be updated?

Done : openzim/zim-tools#377

Actually, it opens some questions like: will libzim automatically remap entries with duplicate content as aliases?

It is not planned. It would means we store (at least) the hash of all added content and do a hash computation and check before adding new content. We could discuss that but I don't think we should do it in the same time than zimit 2.0

@rgaudin
Copy link
Member

rgaudin commented Oct 24, 2023

We could discuss that but I don't think we should do it in the same time than zimit 2.0

I agree, not important for now.

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

Successfully merging a pull request may close this issue.

3 participants