Skip to content

Setting to clean existing distribution before installing #82

@Grinnz

Description

@Grinnz

Problems: A distribution may remove files in a new version, but existing versions of those files are left on the user's system because the new distribution is just installed over the old one. Also, a distribution may be installed into a different directory (commonly sitearch->sitelib or vice versa) because it gains or loses an XS component.

Proposal: A setting the distribution author can enable in Module::Build which removes (only from the location where the distribution is to be installed to or the arch variant, if possible) the existing installation of the distribution, before the new distribution is installed. This would only occur if there is a packlist present. Similar to --uninst 1 but less "greedy" and the author can enable it rather than the user.

Potential issues: interaction with different @INC setups, installation locations, how to keep it "safe" under all these circumstances? are there any instances where core or vendor libs contain packlists?

Prior art: --uninst 1, https://metacpan.org/source/HAARG/Devel-GlobalDestruction-0.14/Makefile.PL#L62-75

Ref: Perl-Toolchain-Gang/ExtUtils-MakeMaker#325

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions