tech-pkg archive

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

Re: Asterisk package naming



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.

Anyway, once asterisk is gone I can change my list from asterisk13 to
asterisk and when I see that it fails to build I can go and build the
version I want manually.  I just like automation.

-- 
D'Arcy J.M. Cain <darcy%NetBSD.org@localhost>
http://www.NetBSD.org/ IM:darcy%Vex.Net@localhost


Home | Main Index | Thread Index | Old Index