[pacman-dev] Alternatives system brainstorm

Andrew Gregory andrew.gregory.8 at gmail.com
Sat Oct 19 12:24:18 UTC 2019


On 10/19/19 at 10:15pm, Allan McRae wrote:
> On 19/10/19 9:57 pm, Daan van Rossum wrote:
> > * on Saturday, 2019-10-19 18:15 +1000, Allan McRae <allan at archlinux.org> wrote:
> > 
> >> /bin/sh -> bash/dash
> >> /usr/bin/awk -> gawk/nawk
> >> /usr/bin/cc -> gcc/clang
> > 
> > Can we provide alternatives by means of sets of mutually exclusive link packages, using package properties that are already supported in pacman?
> > 
> > sh-bash
> > 	provides=('sh')
> > 	depends=('bash')
> > 	conflicts=('sh-dash')
> > sh-dash
> > 	provides=('sh')
> > 	depends=('dash')
> > 	conflicts=('sh-bash')
> > bash
> > 	depends('sh')
> > dash
> > 	depends('sh')
> > 
> 
> Sure - or we could have a system to handle it in a less obtuse manner...
> 
> What happens when a new package wants to provide "sh"?   We need to
> rebuild sh-bash and sh-dash?  Easy enough, except that assumes that all
> three packages are packaged by the same group.  If bash and dash are
> packaged by a distro and the new package by a third party, then the
> conflicts provided by the distro are not enough.  But an alternatives
> system would work.

No rebuilding necessary if the conflicts are changed to just 'sh'.


More information about the pacman-dev mailing list