# Updating package origins does not work



## rekabis (Feb 4, 2014)

I am trying to use:

```
# pkg set -o lang/perl5:lang/perl5.18
```
to ensure that the latest version of perl is used for all perl dependencies (such as various php add-ons). However, even after I specify the above line, any package that I try to install that needs Perl still tries to install “perl5: 5.16.3_6” (Perl 5.16). Why? What do I use to ensure that Perl 5.18 is always used as a dependency?

Using the brand-new FreeBSD 10 with the pkg command in a Hyper-V VM.


----------



## SirDice (Feb 4, 2014)

There is no port lang/perl5, so setting the origin of a non-existing port doesn't work. If you want to replace perl5.16 with perl5.18 the command should be: `pkg set -o lang/perl5.16:lang/perl5.18`


----------



## SirDice (Feb 4, 2014)

Oh, setting the origin only works when building from ports. If a package was built against Perl 5.16 it's going to depend on Perl 5.16 no matter where you set the origin to. And packages are always built using the default options and settings. Meaning everything is currently linked against Perl 5.16.

If you insist on using Perl 5.18 you will have to build your own packages and set up your own repository. There's no way to set this using the 'official' packages.


----------



## rekabis (Feb 4, 2014)

SirDice said:
			
		

> There is no port lang/perl5, so setting the origin of a non-existing port doesn't work. If you want to replace perl5.16 with perl5.18 the command should be: `pkg set -o lang/perl5.16:lang/perl5.18`



I have already done this.

So how do I go around installing something that has a dependency of Perl 5.16, when Perl 5.18 has already been installed? This is my biggest issue, because trying to do so throws a lot of conflict errors.


----------



## SirDice (Feb 4, 2014)

rekabis said:
			
		

> So how do I go around installing something that has a dependency of Perl 5.16, when Perl 5.18 has already been installed? This is my biggest issue, because trying to do so throws a lot of conflict errors.


Currently the only way to do it would be to build from ports. Or set up your own repository if you want to keep using packages on production machines. Setting up a build server to build your own repository is actually easier than it sounds. And it pays off in the end, especially if you maintain a couple of machines.


----------

