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

add nixos-images #29

Merged
merged 5 commits into from Mar 27, 2019
Merged

add nixos-images #29

merged 5 commits into from Mar 27, 2019

Conversation

dramforever
Copy link
Contributor

@dramforever dramforever commented Feb 15, 2019

No description provided.

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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不能比较文件的hash,因为这样的话,同步一次就需要把所有的数据都读一遍。建议改为检查文件大小,以及大小相同的话,依概率抽查 hash。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NixOS 镜像的文件名包含版本号(参见上游文件列表实例),所以这个检查只适用于上一次这个 channel 同步中断的情况,如果运行一切正常的话是不会发生的。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

要不我把这个检查去掉吧?

Copy link
Contributor Author

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

@dramforever dramforever changed the title add nixos-images (wip) add nixos-images Feb 17, 2019
@dramforever dramforever changed the title (wip) add nixos-images add nixos-images Feb 17, 2019
@dramforever
Copy link
Contributor Author

dramforever commented Mar 1, 2019

Please consider NOT merging this until 19.03 is released. That way we have 6 months to figure out the problem that https://nixos.org/channels/ contains unreleased nixos versions. Fixed in b7e0ca6

@z4yx z4yx merged commit 1963a44 into tuna:master Mar 27, 2019
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

Successfully merging this pull request may close these issues.

None yet

3 participants