feat: Add "force_implicit_dirs" to dir/tree. #948
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows users to specify a list of directories to treat akin to the list of system directories, i.e. things that the constructed package should not take ownership of in e.g. the rpm database. (I'm 100% open to a better name for that, btw!)
Example use case:
e.g. /opt/foocorp/service[A,B,C...]
from claiming ownership of /opt/foocorp so that the
service[A,B,C...] packages can be bundled and installed
separately without path conflicts.
The particular scenario I ran into this for was with RHEL8+ being much pickier about each dir being owned by one and only one package. (We pair this with having one "foocorp-dirs" package that just owns the shared dir creation, that's used as a pre-req for the other packages.) We could have done something like explicitly list every sub-dir needed or every file for all the service packages, but using
treewas much more concise and flexible with respect to package contents changing over time, and in effect this is giving the user the ability to specify dirs to treat like the hard-coded list of system directories already checked towards the same end.I have run
task ciand the normal tests pass. There seems to be some issue withopkggoing away on the latest OpenWRT images that keeps theipkacceptance test from working though:Sadly I don't know enough about OpenWRT/opkg/Docker to guess what the right solution would be for that, so I haven't included any changes for it.
Thank you for a cool tool! :)