tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Asterisk package naming



On Tue, Jul 17, 2018 at 03:12:12PM -0400, D'Arcy Cain wrote:
> On 2018-07-17 12:33 PM, Joerg Sonnenberger wrote:
> >>   pkg_info | sed "s/ .*//;s/-[^-]*$//"
> > 
> > Better: pkg_info -e '*'
> 
> OK, that saves me the first half of the sed but the result is still
> asterisk, not asterisk13.
> 
> >> That does not find asterisk13 so I try to install it.  It installs
> >> asterisk-13.19.0nb4.  I run my script again and it still says that
> >> asterisk13 is not installed so I try to install it again.  It never sees
> >> asterisk13 installed.
> > 
> > Actually, it would be better to look at PKGPATH for such matching, i.e.
> > 
> >     pkg_info -e '*' | while read pkg; do 
> >     	[ "$(pkg_info -Q PKGPATH "$pkg")" = comms/asterisk13 ] && echo found
> >     done
> 
> I thought it was obvious but I am not doing this for just asterisk.  I
> am doing it for all my packages.  Asterisk is just the one that needs to
> be special cased and I just wonder what would be so bad about making it
> orthogonal to every other package.

It might the only case in *your* set. It is certainly not the only case
in pkgsrc. PHP comes immediately to mind.

Joerg


Home | Main Index | Thread Index | Old Index