-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Is your feature request related to a problem? Please describe.
Conceptually when installing a file in the fakeroot (pkgdir), it must not be possible to delete it in the functions:
- postinst()
- preinst()
The motivation is subtle but damn simple.
A file within the fakeroot (pkgdir, placed by the package function) it's considered as the final target package content (the package it's the owner of the fakeroot content, in other words).
When you remove or create an ephemeral or generated config file or something else similar (in postinst, for example), this should be checked against the fakeroot content.
This avoid bad practices and strage warnings (something that sounds approximately like: the file named x has no owners throughrough the packageset)
Describe the solution you'd like
Compare and check for same files path between fakeroot and pos|pre install stages. Something fuzzy? Idk
Exit with failure and show an informative message
Would be nice to have a --force flag in case you just need it (you know what are you doing)