Skip to content

Adding snap classic confinement support #1200

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Stefterv
Copy link
Collaborator

@Stefterv Stefterv commented Aug 12, 2025

Fixes #1186
Fixes #1147
Fixes #1119
Fixes #995

@Stefterv Stefterv force-pushed the snap-classic-support branch from 9f4de54 to bccf99b Compare August 12, 2025 12:19
@Stefterv Stefterv force-pushed the snap-classic-support branch from bccf99b to eece777 Compare August 12, 2025 12:42
@Stefterv Stefterv requested a review from catilac August 12, 2025 13:15
@Stefterv Stefterv marked this pull request as ready for review August 12, 2025 13:15
@Stefterv Stefterv added this to the 4.4.6 milestone Aug 12, 2025
Copy link

@catilac catilac left a comment

Choose a reason for hiding this comment

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

This LGTM. I left one comment, but it's up to you if you want to address it. Generally, I like to ask questions mostly out of curiosity :)

Comment on lines +256 to +265
if (confinement != "classic") return@let it
// If confinement is not strict, remove the PLUGS section
val start = it.indexOf("# PLUGS START")
val end = it.indexOf("# PLUGS END")
if (start != -1 && end != -1) {
val before = it.substring(0, start)
val after = it.substring(end + "# PLUGS END".length)
return@let before + after
}
return@let it
Copy link

Choose a reason for hiding this comment

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

could this be moved into a helper function?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, but it is only being used once, which means it would clutter up the file and be less clear where it is being used

@SableRaf SableRaf mentioned this pull request Aug 14, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants