Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

In case of package pattern conflict file should go to most specific match #31

Open
ReillyBrogan opened this issue Sep 23, 2022 · 2 comments
Labels
chat: brainstorming Wild ideas to spur on the inspiration.

Comments

@ReillyBrogan
Copy link

packages    :
    - "%(name)-devel":
        paths:
            - /usr/bin/ldns-config
            - /usr/share/man/man1/ldns-config.1
            - /usr/share/man/man3
    - "%(name)-utils":
        paths:
            - /usr/bin/*
            - /usr/share/man/man1

In this case /usr/bin/ldns-config ends up in the -utils package when it should be in -devel. This is clearly not ideal and the pattern match should work in that the more specific pattern should get the file (even if this is simply evaluated by length of the pattern string, EG /usr/bin/ldns-config is longer than /usr/bin/* and should therefore get the file)

@ReillyBrogan
Copy link
Author

Update: This might not be the result of what I thought it was. The current working theory is that because %(name)-devel is a default pattern that it's already getting a priority and therefore %(name)-utils is always a higher priority regardless of the order of the patterns in this example.

@sunnyflunk
Copy link
Contributor

If anything there needs to be a priority system, whether implicit (first specified gets priority), or explicit (a new key). Implicit is probably sufficient (though slightly less clear).

The issue with the example is trying to 'do too much'. Splitting packages should be really simple and the -utils package is completely flawed. Splitting the libraries always makes the most sense (the -devel package is dep complete without adding any rundeps in 99% of circumstances) and when you install the package by name, you actually get the package!

Package splitting documentation would help a lot here, which currently would be that you need a strong case for it.

@livingsilver94 livingsilver94 added the chat: brainstorming Wild ideas to spur on the inspiration. label Jul 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
chat: brainstorming Wild ideas to spur on the inspiration.
Projects
None yet
Development

No branches or pull requests

3 participants