Skip to content

preserve=yes needs to skip remove scriptlets. #684

@Duncaen

Description

@Duncaen

In c11dba0 the behavior of preserve=yes packages was changed to behave the same on explicit removal and update, in both cases files are now preserved. This is done so that xbps-remove does not circumvent vkpurge and its "is this kernel booted" check before uninstalling the kernel files.

But currently the remove scripts still run on explicit removal, instead the remove script should probably be completely skipped if the package was build with preserve=yes.

There is currently two stages in the remove scriptlets, remove and purge, they usually just run one after another and don't really have any use. I thought about removing the purge stage before, because every extra script execution just adds overhead without any real benefit.
It might make sense to to keep both stages and make use of that differentiation for the preserve=yes scripts, but I'm not convinced that it would actually be beneficial, especially because preserve=yes is really only used for kernels.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions