ports and packages installed on one system, how to make pkg only

Matthew Seaman matthew at FreeBSD.org
Thu Sep 26 18:50:57 UTC 2019

On 26/09/2019 17:29, tech-lists wrote:
> Hello Matthew,
> On Thu, Sep 26, 2019 at 04:59:27PM +0100, Matthew Seaman wrote:
>> A pkg is what you get from compiling a port.  Once the port is installed
>> it's a pkg and there's no functional difference from a pkg installed
>> from one of the package repositories.
>> Or, in other words, just update your machine from the pkg repos.  It
>> will replace anything that's out of date, no problem.  There's no
>> particular need to force an update on all packages -- if it's already
>> there and working OK, then my inclination would be to leave it be.
> What's of particular concern for me is that the machine had this in its
> /etc/make.conf when it was building it's own ports:
> DEFAULT_VERSIONS+=python=2.7
> I've since removed it.
> Since then, the machine has been brought to 12R-p10 and I've made a
> poudriere
> instance for it on different hardware which has nothing special in its
> own make.conf. I fed it a ports list obtained on the client through
> *portmaster --list-origins | sort -u | tee portslist.txt*, transferred
> that to
> poudriere and it built the ports, and all the flavoured python ones were
> py36-*
> So, if I *pkg upgrade -f* on the client (which now knows to use my
> poudriere
> instance), would it be reasonable for me to expect all py27* to be
> upgraded to py36*, without stuff breaking?
> thanks,

Actually, you'll probably not see everything upgrade completely smoothly.

The generic repos build both python-2.7 and python-3.6 flavours of
python ports, so in that case many pkgs would just upgrade to the latest
available for the py27 flavour.

However, since you've built your own repo with only the py36 flavours,
you might see two possible outcomes:

   i) Something else you have installed now has a python-3.6 dependency,
so all of those dependent python-3.6 ports get installed alongside the
existing python-2.7 equivalents.

  ii) pkg can't find a newer version of your python-2.7 packages so just
leaves what you already have installed in place.

In theory everything should still work, either as python-2.7 or
python-3.6, but in practice it is distinctly possible that you'll run
into some turbulence.

In this case you can use eg.

    pkg version -vRL=

to list all packages you have installed that aren't in your repo, and
you should be able to delete any py27 packages from that list, and
replace them with py36 equivalents.  Also, if there are any other
packages locally installed but not in your repo, you can simply add
them, or delete them if nothing now has them as a dependency (pkg
autoremove helps here) or else work out what options have changed
between your two setups and sort out the inconsistencies that way.

Converting everything wholesale from py27 to py36 will /probably/ just
work, but no guarantees.  As ever, test early and test often.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20190926/b8d6c2f8/attachment.sig>

More information about the freebsd-questions mailing list