tech-pkg archive

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

Re: Asterisk package naming



On 2018-08-02 01:58 PM, Greg Troxel wrote:
> So somehow, you need to have a file that (more or less) has one line
> describing every package you want installed, per machine, and then to
> cat/sort/uniq these to run your bulk build.  Apparently that file right
> now has PKGNAME in it, and your bulk build script tries to convert those
> to PKGPATH..  That is basically troublesome, and we are suggesting that
> instead you have control files that have PKGPATH instead.

Yes, I suggested that possibility too earlier but it still works for
everything except asterisk.  If I put comms/asterisk13 into the file
then what pkg_info command do I give to see if it is installed?

# pkg_info -Q PKGPATH comms/asterisk13
pkg_info: can't find package `comms/asterisk13'

If I split on the '/'...

# pkg_info -Q PKGPATH asterisk13
pkg_info: can't find package `asterisk13'

>> How?  Did you follow my examples?  PKGPATH may even work for other
>> packages but not for asterisk until comms/asterisk is removed.
> 
> If you want asterisk 1.5, then just put
> 
> comms/asterisk15
> 
> in your file that has a list of PKGPATHs.  I mean to specify the path to
> the directory to build, not the package name, so no magic is necessary.

If I special case asterisk to remove the version and split on the slash
then it looks like it is already installed since I have asterisk13
installed but it reports as asterisk either way.

If we don't want to do meta packages for multiple versioned packages
then the only other way to do it is the same way we do postgresql (e.g.
postgresql95-9.5.13) and Python (e.g. python36-3.6.6).  The different
versions should install as versioned package names e.g.
asterisk13-13.19.0nb5.

> If you want to have a list of PKGNAME, then you are going to be pushing
> wet noodles uphill until you have completely reinvented pkgin (which
> might do what you want if you stop insisting on having a list of
> PKGNAMEs).
> 
> pkgsrc has an implicit mapping between PKGNAME and PKGPATH, and this is
> I believe in pkg_summary, and used by pkgin.  Trying to write ad hoc
> rules that guess intead of computing and using and actual mapping is
> just going to cause pain.

If there was a tool that would tell me the PKGPATH before it was
installed that would work.

> And if your only real problem is the existence of comms/asterisk, could
> you just put a special case in your script?  That seems faster than this
> discussion.

Maybe but since it is going away soon my system will work safely with
just a small amount of manual handling.  My script deals with building
95% of the stuff I need automatically and 99.9% of checking if
everything is installed yet.  The 0.1% is asterisk.

-- 
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