Re: Using pkg in documentation

2020-04-27 Thread Muhammad Moinur Rahman


> On 27 Apr, 2020, at 05:54, Samy Mahmoudi  wrote:
> 
> Hi,
> 
> What about using the meta-port lang/python ? You could write something like
> the following lines in your documentation:
> PY=`pkg rquery -r FreeBSD "%dn" lang/python | head -n 1 | sed "s/python//"`
> pkg install py${PY}-babel
> 
> "-r FreeBSD" can indeed be ommited in a default configuration where the
> user has not configured several repositories. As you cannot guarantee that
> last condition is met, I would suggest not to omit that part.
> 
> I hope this will help,
> Samy Mahmoudi
> ___
> freebsd-ports@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org”

That’s one possible way of doing it. But we don’t have a meta port for php so 
it’s not going to work for that. I am looking for a uniform way of doing it.

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Using pkg in documentation

2020-04-27 Thread Miroslav Lachman

On 2020-04-27 09:10, Baptiste Daroussin wrote:

On Mon, Apr 27, 2020 at 08:23:09AM +0200, Miroslav Lachman wrote:

On 2020-04-26 21:37, Muhammad Moinur Rahman wrote:

What is the way of mentioning about installing a py-package in documentation? 
Let’s say now the default version of python is 3.7 so in most of the cases we 
can write in our documentation that do the following:
# pkg install py37-babel


You can use following form too:
 pkg install devel/py-babel


Which would install all flavor of py*-babel imho thta is wrong


You are right. My bad. I am using it with private repo where only one 
flavor exists.


Miroslav Lachman

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Using pkg in documentation

2020-04-27 Thread Baptiste Daroussin
On Mon, Apr 27, 2020 at 08:23:09AM +0200, Miroslav Lachman wrote:
> On 2020-04-26 21:37, Muhammad Moinur Rahman wrote:
> > What is the way of mentioning about installing a py-package in 
> > documentation? Let’s say now the default version of python is 3.7 so in 
> > most of the cases we can write in our documentation that do the following:
> > # pkg install py37-babel
> 
> You can use following form too:
> pkg install devel/py-babel
> 
Which would install all flavor of py*-babel imho thta is wrong

Best regards,
Bapt


signature.asc
Description: PGP signature


Re: Using pkg in documentation

2020-04-27 Thread Miroslav Lachman

On 2020-04-26 21:37, Muhammad Moinur Rahman wrote:

What is the way of mentioning about installing a py-package in documentation? 
Let’s say now the default version of python is 3.7 so in most of the cases we 
can write in our documentation that do the following:
# pkg install py37-babel


You can use following form too:
pkg install devel/py-babel

Miroslav Lachman
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Using pkg in documentation

2020-04-26 Thread Samy Mahmoudi
>  PY=`pkg rquery -r FreeBSD "%dn" lang/python | head -n 1 | sed
"s/python//"`

You can even replace head with a sed command if you need to save some
characters on the line:
PY=`pkg rquery -r FreeBSD "%dn" lang/python | sed "s/python//;1q"`

>
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Using pkg in documentation

2020-04-26 Thread Samy Mahmoudi
Hi,

What about using the meta-port lang/python ? You could write something like
the following lines in your documentation:
PY=`pkg rquery -r FreeBSD "%dn" lang/python | head -n 1 | sed "s/python//"`
pkg install py${PY}-babel

"-r FreeBSD" can indeed be ommited in a default configuration where the
user has not configured several repositories. As you cannot guarantee that
last condition is met, I would suggest not to omit that part.

I hope this will help,
Samy Mahmoudi
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"