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
add nixos-images #29
add nixos-images #29
Conversation
nixos-images.py
Outdated
keep_files.add(file_name) | ||
|
||
if (chan_path / file_name).is_file() \ | ||
and file_hash == file_sha256(chan_path / file_name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不能比较文件的hash,因为这样的话,同步一次就需要把所有的数据都读一遍。建议改为检查文件大小,以及大小相同的话,依概率抽查 hash。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NixOS 镜像的文件名包含版本号(参见上游文件列表实例),所以这个检查只适用于上一次这个 channel 同步中断的情况,如果运行一切正常的话是不会发生的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
要不我把这个检查去掉吧?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nixos-18.09.2203.9bd45dddf81-x86_64-linux.ova
nixos-graphical-18.09.2203.9bd45dddf81-x86_64-linux.iso
nixos-minimal-18.09.2203.9bd45dddf81-i686-linux.iso
nixos-minimal-18.09.2203.9bd45dddf81-x86_64-linux.iso
|
No description provided.