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 12:23 PM, Greg Troxel wrote:
> D'Arcy Cain <darcy%NetBSD.org@localhost> writes:
>> It's probably my fault for not being clear enough.  I have a list of
>> packages that includes asterisk.  I could change that to comms/asterisk
>> but how do I know if it has been installed?
> 
> pkg_info -Q PKGPATH -a
> 
> will give you the PKGPATH of every installed package.

I guess I am still not being clear.  PKGPATH works on installed
packages.  I need to know what's NOT installed.  Look at my examples.

>> $ pkg_info -Q PKGPATH asterisk
>> pkg_info: can't find package `asterisk'
>>
>> So not installed yet but then how do I know which directory to build it
>> from?  My script guesses "/usr/pkgsrc/*/asterisk" which succeeds but
>> installs the wrong version.  I can't use pkg_info to get the directory
>> until AFTER it is installed.  Catch 22.
> 
> If you are generatign a list from what's installed, you can use the
> command I gave above.  If you are doing it by hand, then you can just do
> it by hand :-)

The point of my script is to not have to handle 1048 packages
distributed to multiple servers by hand.

I am not generating a list from what is installed.  I am creating a list
of what I want to be installed.  Sometimes I need to remove a bunch of
packages because pkg_rolling-replace doesn't handle dependencies
correctly.  I then have to remove a package so that I can install the
correct version.  Sometimes that means removing a bunch of packages that
I still want.  I then have to run my script to see what's missing.

>> Yes, sometimes the guess will fail but except for asterisk it always
>> fails by installing nothing and I can handle it manually.  Except for
>> asterisk once everything is installed my script does not complain about
>> anything.
> 
> Once you move to PKGPATH, I think you'll be ok.

How?  Did you follow my examples?  PKGPATH may even work for other
packages but not for asterisk until comms/asterisk is removed.

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