-
Notifications
You must be signed in to change notification settings - Fork 25
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
20-files-present-and-referenced: Check for files in *.obscpio + bonus fix #127
Conversation
It's $f, not $file.
I'm not sure it would take a very long time, if the cpio contents are listed once and the list is stored. But it's additional feature though. For context, 100MB cpio,
|
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.
I guess the skip should be temporary until cpio scanning is added.
It's about 0.4s here for libqt5-qtbase. Might be possible to do this lazily only when first needed, then there's only the overhead of possibly scanning through >50k filenames. I'll have a try, maybe it's simple enough. |
You can also use something like |
Took ~2.3s. For some reason cockpit-tukit has a larger node_modules (142MiB vs. 107MiB). |
.obscpio files are extracted before build and the contents can be used as sources. As .obscpio files can be quite large, only look through them when needed.
I tried it locally, and there is basically no difference (in runtimes) between the version that reports errors by not scanning cpio and the current version that actually scans those files lists. I guess all the Runtime for me is also ~2.0s LGTM! Thanks! |
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.
not happy with unpacking all the obscpio archives, but don't yet see a better way
.obscpio files are extracted before build and the contents can be used as
sources. This is not the only use case for obscpio though: most of the time
they carry the (large) source code, which is converted to a tarball by a
buildtime service. We can't easily tell those cases apart, so just don't
bother.
It would be possible to avoid false negatives here by checking against the cpio listing as fallback, but that might take very long for larger .obscpio archives containing source code.