Solved pkg and default perl version 5.34

Hello,
I recently upgraded default system perl version to 5.34 and state it at /etc/make.conf file as:
Code:
DEFAULT_VERSIONS+=perl5=5.34

My software is built from ports and there is no problem or incompatibility issue. Nevertheless I am using pkg program to query packages and perform some quick tasks or quick installation. It shouts like this:
Code:
New packages to be INSTALLED:
        perl5.34: 5.34.1_2
        ...
      
pkg: perl5.34-5.34.1_2 conflicts with perl5-5.34.1_2 (installs files into the same place).  Problematic file: /usr/local/bin/perl5.34.1
I found similar problem in this forum from upgrading perl to version 5.20 Tried to set name and migrate perl to new version as SirDice suggested, but no success. It somewhere remembers old version of Perl. Where can I configure it for pkg? Thanks!
 
make.conf only applies when building from ports, it has absolutely no influence on packages. The official packages are always built using the default settings, that's Perl 5.32. So any package that has a dependency on Perl is going to want to install 5.32 and will remove your 5.34 version.

Build all the packages you need on your own repository. Then you can set the default to 5.34 and don't have conflicts. Alternatively, compare the versions with your INDEX instead of the remote repository; pkg version -vI (make sure to run make index after updating your ports tree).
 
Never thought about having my own repository. Now I understand why pkg (7)always wants to "downgrade" perl.
Is there any difference between make fetchindex and make index when working with ports? Usually I am just fetching it after pulling sources. How hard and resource consuming is to run own repository? There are thousands of ports to compile and subset I am using takes around one day to rebuild everything.
 
Is there any difference between make fetchindex and make index when working with ports?
Yes, fetchindex will fetch an index from the FreeBSD repositories. That's an index that's built around the default versions. make index will generate an INDEX-* based on your DEFAULT_VERSIONS settings and your current state of the ports tree.

How hard and resource consuming is to run own repository?
Depends on what you need. And the server you use to build all those packages. My old i5-3770 will take about 2 days to build 4 different repositories for me (for 13.1-RELEASE and 13-STABLE, and a 'desktop' and 'server' repository each). I don't build everything, I have a list of ports I need and it only builds those.
 
Unless there is very good reason keep the default versions.
If you want to muck around with the defaults you really need to build your own repository. Or else you're going to end up in dependency hell battling your defaults with the FreeBSD ports tree defaults.
 
I decided to revert back to default version 5.32 unless 5.34 will be released at ports. Checked all software and there is no reason to upgrade, like Alain De Vos correctly noticed
 
Back
Top