Open fraenki opened 1 year ago
given that our repo conf is fairly close to UCL, we should probably use arrays instead of single strings here
This feature would be a nice addition if one want to provide it. Not very complicated, I will be low priority in my todo, but would be an "easy" task for new contributors.
Hi @bapt, thanks for chiming in. Could you probably provide a rough outline what components of pkg must be altered to add this feature? Thanks :)
I would exclude the packages at the moment the metadata are sync into the remove db. in libpkg/repos/binary/* and prevent the package in the exclude list to be synced into the db, so the reste of the code is untouched. the drawback being if you append things in the exclude list then you need to rerun pkg update -f, but I think this is a fair limitation
It would be good to make this handle flavors. Perhaps an explicit flavour syntax: portname@flavor with an explicit "at all" to exclude all flavors. The older approach of portname globs isn't fine-grained enough (e.g., postfix would catch postfixadmin, postfix-policyd-*, et al). Alternately, make it origin-based: "category/portname" to exclude all pkgs with that origin, "category/portname@flavor" to exclude just that flavor.
It would be very useful if
pkg
would provide an option to include or exclude certain packages when using multiple repositories. For example:This example demonstrates my main use-cases:
This example is derived from the options currently available in DNF/YUM, see
YUM.CONF(5)
:I think adding these options would make the multi-repo feature more usable. Currently my own packages are always replaced with the versions from the FreeBSD repository when there is a newer version available. Having the
includepkg
andexcludepkg
options would make this very easy to achieve. On Rocky/Redhat Linux these options make it very easy for a lot repositories from many sources to co-exist without troubles.On the other hand this may be another challenge for the dependency/conflict resolver, but that's probably a good thing and would allow to further improve it. :)