-
Notifications
You must be signed in to change notification settings - Fork 47
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
Provide a way to exclude packages/slices when running cut
#156
Comments
@lengau Apologies for taking so long to reply. I think I am missing some context here, are you saying that you want to install |
Thanks for the response! The use case here would be for systems where we're going to have a different base than rocks - e.g. snaps and charms. Currently Rockcraft does this by using overlays and deduplicating files, but snaps and charms can't do this for a variety of reasons, one of which is that it's not feasible for snaps to tell whether a file was staged because it's in a stage-package dependency (can be removed because the base snap provides it) or because it's output of the part. If chisel implements this feature, Snapcraft could parse e.g. This is similarly true for charms, which right now do not support staging packages at all, causing users to do workarounds in Charmcraft using |
This is an interesting feature request and we should definitely talk more about it. This sounds too craft-specific, which makes me wonder if Chisel is the right place to handle it. But maybe there are other useful cases for such a feature. In fact, even if we were to implement this feature, we must first consider the ability for Chisel to Let's discuss it. Would you be able to join one of our Rocks Community monthly meetings or even the Rockcraft weekly sync? We can also talk about it during the Clinic hours. |
I also want to add that now that Chisel is able to generate a manifest you can deal much more easily with:
You can include We need better documentation for the manifest and we are working on it but if you have any questions about your use-case we'll be happy to help. |
It would be nice to be able to exclude certain packages or slices when running
cut
, even if those are dependencies of the requested chisel slices. This would allow snaps and charms to be able to use chiselled packages without pulling everything all the way back tolibc
.Ideally for my particular use case (integrating chisel into more craft* apps), we'd be able to pass an exclusions file (one package/slice name per line in a text file), and if a slice is explicitly listed it overrides that exclusions file.
Examples for why I'd like this
A core24 snap that only stages `curl_bins` is 8.6 MiB, whereas using craft-parts's ignore list but extracting the full debs is still only 1.1 MiB. Here's the `snapcraft.yaml` file:A real-world example that could use this feature are the postgresql charms. Currently they're using a workaround because Charmcraft doesn't stage packages correctly. However, an "ideal" version of this would have this part instead:
The text was updated successfully, but these errors were encountered: