upgrade with pkgng insists to downgrade other packages...

On a 9.2-RELEASE I want to upgrade some packages which are older than the available packages, e.g. pear 1.9.4_2 which should be updated to 1.9.4_3.

The problem is, that pkg upgrade or even pkg install pear always wants to install php5.4.21, which is older than the installed php5.5.5.

I even did this for all wrong dependencies: pkg set -o lang/php5:lang/php55

But when I retry to upgrade or to (re)install Pear alone, always the old PHP version is wanted (I never run through the installation/upgrade to prevent a mess).

Code:
The following 6 packages will be installed:

        Reinstalling libiconv-1.14_1 (needed shared library changed)
        Reinstalling pcre-8.33 (needed shared library changed)
        Reinstalling libxml2-2.8.0_2 (direct dependency changed)
        Installing php5: 5.4.21
        Installing php5-xml: 5.4.21
        Upgrading pear: 1.9.4_2 -> 1.9.4_3

Any hints what I might did wrong?
 
You're not doing anything wrong. Packages are always built using the default options. And the default PHP is lang/php5 which is 5.4.x.
 
SirDice said:
You're not doing anything wrong. Packages are always built using the default options. And the default PHP is lang/php5 which is 5.4.x.

Ok, thank you so far, but why is the pkg set -o lang/php5:lang/php55 not respected? In my understanding this should override the default PHP in this case? When I read the pkg set manpage there are examples showing exactly this, isn't it?
 
It does that only for the packages that are installed at the time when you execute the pkg set command. Packages that are installed after that still want to pull their own dependencies. The pkg set does not set any preferred versions, it's only for fixing wrongly set dependencies on already installed packages.

Before you ask, setting such preferences do not belong in pkg(8). They belong in the ports(7) infrastructure and a hypothetical package manager application (in the vein of aptitude for Debian bases Linuses) that does not exist yet.
 
@kpa, thanks a lot for this view.

So, it won't be possible to stop pkg from reinstalling old dependencies with e.g. defining NO_DEPENDS as suggested in the ports(7) manpage? So, pkg should ONLY be used on a system where I don't want to decide what's going on? ;)
 
Last edited by a moderator:
Either that or set up your own repository and build your own packages. Then you can set whatever dependencies you want.
 
NO_DEPENDS disables installation of the dependencies of a port so that's not very useful ;)

What is really missing is a way to configure a set of preferences like "I want PHP version 5.5 for all packages that need PHP". How to really do that, I don't know yet. The way the dependencies are set to stone at the compile time is in direct conflict with the need to change them at installation time and I don't see an easy solution to this problem.
 
Back
Top