Skip to content

Add pkg_install(wipe_destdir: bool) #893

@jacky8hyf

Description

@jacky8hyf

I want to request a feature to add the following:

pkg_install(
    wipe_destdir = True,
)

Default value is false. If true, pkg_install() script will wipe the given destdir before installing the files.

This is particularly useful if we want the resulting destdir to be always strictly containing the given list of files, but not any old files. For example, I have a pkg_install() rule that generates stardoc and put it in our source tree. If the list of generated file names changes, I need to manually delete the old documentation files now. But with this attribute, I can set it to True so I don't have to manually delete old documentation. The example is illustrated here: https://r.android.com/c/kernel/build/+/3273727/2/kleaf/docs/BUILD.bazel

@aiuto if you think this is a useful feature, I can start preparing a pull request; or please let me know if this does not fit in pkg_install(). Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2An issue that should be worked on when time is available

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions