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 12:17:12PM -0400, D'Arcy Cain wrote:
> On 2018-07-17 11:37 AM, Joerg Sonnenberger wrote:
> > On Tue, Jul 17, 2018 at 11:26:31AM -0400, D'Arcy Cain wrote:
> >> OK, so what about the other part of my proposal?  If I install the
> >> asterisk13 package it installs asterisk13-13.yy, not asterisk-13.yy.
> >> There is prior art for that, e.g. python37-3.7.0, postgresql95-9.5.13,
> >> php56-mysqli-5.6.36, etc.
> > 
> > I don't like it. I don't see the point, really. comms/asterisk should be
> > removed in the nearer future, so only the versioned directories remain.
> > I don't see how renaming the packages helps in any way.
> 
> I want to install asterisk13.  My scripts look at what is currently
> installed with this.
> 
>   pkg_info | sed "s/ .*//;s/-[^-]*$//"

Better: pkg_info -e '*'

> 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

Joerg


Home | Main Index | Thread Index | Old Index