Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Feb 2008 12:23:26 -0600
From:      James <james@hicag.org>
To:        FreeBSD-ports <freebsd-ports@freebsd.org>
Subject:   Re: Portupgrade not running get_notinstalled_depends (2.4.3_1, 2 vs 2.4.3_2, 2)
Message-ID:  <abd3d3c20802221023m439fbf51n226b93bd4153fa5b@mail.gmail.com>
In-Reply-To: <abd3d3c20802200732y12ef24dbw88bccf5814db5fdd@mail.gmail.com>
References:  <abd3d3c20802200732y12ef24dbw88bccf5814db5fdd@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 20, 2008 at 9:32 AM, James <james@hicag.org> wrote:
> For example, in my tests, if I have an alt-dep set for a package and
> I install a port that depends on that package it'll still install
> the original package rather than my alt-dep.

    In case anyone's interested or running into this too I have an
    update to the issue I ran into here.

    As it turns out I was off base about the cause of the problem.  It
    wasn't the change instituted in version 2.4.3_2,2 at all.  That
    version fixes a problem when upgrading ports, not installing them.
    I was running into problems installing ports.

    In one of my tests I was installing the following ports in one
    portinstall session.

    databases/mysql50-client
    databases/mysql50-server
    databases/mysql50-scripts
    databases/mytop

    The problem I ran into was with databases/p5-DBD-mysql50 vs.
    databases/p5-DBD-mysql.

    databases/mysql50-scripts depends on databases/p5-DBD-mysql50 and
    databases/mytop depends on databases/p5-DBD-mysql.  portinstall
    tries to install both and fails because they conflict.  I figured
    I could use ALT_PKGDEP to help me here.  I used this:

    'databases/p5-DBD-mysql' => 'databases/p5-DBD-mysql50',

    But the install was still failing.  After reading the code and
    working in irb a bit I traced the problem down to the way alt_dep
    (used when resolving alt-deps) works.  Turns out it only works
    when the port involved in the alternate dependency is already
    installed (because it uses pkgdb methods -- if the port isn't
    installed pkgdb has nothing to say).  In other words the alternate
    dependency will not take effect if the port involved is being
    installed in the same session that the alternate dependency is
    being used.

    I was able to work around my trouble by installing -client,
    -server, and -scripts first.  Then installing mytop in another
    session.  Viola, the alt-dep works because the port involved in
    the alt-dep already present.

    If anyone considers this a bug I'd be happy to help work on a
    correction.  Heck I may do it anyhow.

    HTH!

-- 
James.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?abd3d3c20802221023m439fbf51n226b93bd4153fa5b>