Skip to content

contrib: Skip RPM scriptlets during cleanup - #2561

Open
ckyrouac wants to merge 1 commit into
bootc-dev:mainfrom
ckyrouac:destructive-cleanup-fix
Open

ckyrouac wants to merge 1 commit into
bootc-dev:mainfrom
ckyrouac:destructive-cleanup-fix

Conversation

@ckyrouac

@ckyrouac ckyrouac commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

This cleanup removes packages from the previous OS in a special root context. Their erase scriptlets can fail or act on the wrong system, so skip them.

Fixes #2559

@ckyrouac
ckyrouac requested a review from jeckersb October 8, 2026 21:40
ckyrouac added a commit to ckyrouac/bootc that referenced this pull request Oct 8, 2026
This cleanup removes packages from the previous OS in a special root context.
Their erase scriptlets can fail or act on the wrong system, so skip them.

Fixes: bootc-dev#2561

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
@ckyrouac
ckyrouac force-pushed the destructive-cleanup-fix branch from 6a42326 to c9c5c24 Compare October 8, 2026 21:41
This cleanup removes packages from the previous OS in a special root context.
Their erase scriptlets can fail or act on the wrong system, so skip them.

Fixes: bootc-dev#2559

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
@ckyrouac
ckyrouac force-pushed the destructive-cleanup-fix branch from c9c5c24 to 22df875 Compare October 8, 2026 21:43
@jeckersb

jeckersb commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

re: my comment over in #2560 (comment) I think I was wrong about alternatives getting "outside" of the --/root=sysroot because rpm is running the scriptlets inside of a chroot. But I think something goofy still happens when you kill the entire system like that in one transaction. I'm trying to poke a bit more in testing-farm just to better understand.

I think this is probably still the correct fix, though, regardless of the outcome of my investigation.

@jeckersb

jeckersb commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Ok more added in #2559 (comment), I'm less certain about this approach now. This PR would probably be sufficient, but given the added context feels a bit hacky.

@cgwalters

Copy link
Copy Markdown
Collaborator

I'm not a fan of skipping all scripts; it's a big hammer. Not saying it's wrong but a targeted fix feels better.

@ckyrouac

ckyrouac commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

The goal of the bootc-destructive-cleanup-script is to reduce disk space used by the old system without removing interesting configs/user defined state. Seems like it'd be best to ensure the RPMs are removed since that will most likely be the largest chunk of disk space to free. Although I'm not sure what is typically done in a post uninstall script, so maybe there is some significant space that would be freed that we would miss when using --noscripts.

This branch has not been deployed

No deployments
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.

downstream tmt test failure

3 participants