feat: validate manifest before writing#159
Conversation
letFunny
commented
Oct 2, 2024
- Have you signed the CLA?
rebornplusplus
left a comment
There was a problem hiding this comment.
Looks good to me! I left a comment below about a function name.
niemeyer
left a comment
There was a problem hiding this comment.
Very nice, thanks. Only a trivial adding some notes to fastValidate.
internal/manifest/manifest.go
Outdated
| return perm | ||
| } | ||
|
|
||
| // fastvalidate validates the data to be written into the manifest on disk. |
There was a problem hiding this comment.
Can we please add:
// fastValidate validates the data to be written into the manifest.
// This is validating internal structures which are supposed to be correct unless there is
// a bug. As such, only assertions that can be done quickly are performed here, instead
// of it being a comprehensive validation of all the structures.
There was a problem hiding this comment.
I went ahead and edited it as it's just an additional comment.
| Name: "slice2", | ||
| } | ||
|
|
||
| var generateManifestTests = []struct { |
|
Sorry to make the question here. What's the plan, add a an essential manifest slice to all packages like we have for copyright? ex.: package: libc6
essential:
- libc6_copyright
- libc6_manifest
slices:
(...)
copyright:
contents:
/usr/share/doc/libc6/copyright:
manifest:
contents:
/var/lib/chisel/**: {generate: manifest} |
|
It doesn't need to be in We actually do provide the slice as of this writing. It's |
|
So, what I understood was:
And Am I right? |
Correct.
Nope. |