Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Apr 2020 01:54:12 +0200
From:      Samy Mahmoudi <samy.mahmoudi@gmail.com>
To:        Muhammad Moinur Rahman <bofh@freebsd.org>
Cc:        "ports@freebsd.org" <ports@freebsd.org>, python@freebsd.org
Subject:   Re: Using pkg in documentation
Message-ID:  <CAFigVTMafvSn-4TE98yF4duya=MOmzrNp13B1EpXVKdvxMkUZg@mail.gmail.com>
In-Reply-To: <51F445F4-9F4F-4B64-BFC3-FBCC337A8267@freebsd.org>
References:  <51F445F4-9F4F-4B64-BFC3-FBCC337A8267@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFigVTMafvSn-4TE98yF4duya=MOmzrNp13B1EpXVKdvxMkUZg>