tech-pkg archive

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

Re: Asterisk package naming



D'Arcy Cain <darcy%NetBSD.org@localhost> writes:

> 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/-[^-]*$//"
>
> 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.
>
> I suppose I can special case it but it seems like a workaraound for a wart.

It is very normal to have

  category/foo1
  category/foo2
  category/foo3

that all install the foo package of varying versions, with things named
foo, such that you can only install one of them.


I think the problem is that you are making an assumption that you can go
from a package name to a directory.   But, it may be that pkg_info -B is
useful, as you can get at PKG_PATH.

  


Home | Main Index | Thread Index | Old Index