tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg_add and update



 >> On Sat, Feb 19, 2011 at 06:27:47PM +0200, Aleksey Cheusov wrote:
 >> [... some rationale skipped ...]
 >>> Can 'pkg_add -D' be adapted for ignoring CONFLICTS field just like it
 >>> does for DEPENDS? Because this relates to not only my pkgnih but also
 >>> pkg_rr, pkg_chk, pkgin and others I believe it a common interest. As
 >>> about files causing CONFLICTS, I think pkg_add should work like the
 >>> following. While installing A-0.2 files common to A-0.2 and B-0.1 (if
 >>> any) should be assigned to A-0.2. While installing B-0.2 these common
 >>> files should not be removed from the file system ignoring the fact they
 >>> were part of B-0.1.
 >> 
 >> I think this is just another workaround.
 >> 
 >> My preferred solution would be that pkg_add be improved so that it can
 >> automatically update all or at least a complex subset of all installed
 >> packages, handling this case automatically, and not every tool that
 >> sits on top of it must learn another way to cope with this kind of
 >> problem.

> I still wonder what exactly is problem with in place upgrades 
> e.g. gentoo portage works quite fine with them I'm using it on all my 
> servers and never had problem with it even during very tuff upgrades.

> So what's the problem with in place upgrades ?

pkg_rr builds packages in topological order one-by-one and installs them
with a help of pkg_add -U. The original problem was that 'pkg_add -U'
may fail due to unresolved dependencies. For example, if you have A-0.1
and B-0.1 that DEPENDS on A>=0.1<0.2 installed and A-0.2 and B-0.2 that
DEPENDS on A>=0.2<0.3 in pkgsrc tree 'pkg_add -U A-0.2' command fails
due to unresolved A>=0.1<0.2 dependency of package B-0.1. Recently -D
option was added to pkg_add in order to solve this problem and avoid
using 'pkg_add -f'. Since then pkg_rr uses 'pkg_add -UD'.  But the
problem still exists with CONFLICTS (see example above). pkg_add still
may unexpectedly fail in the middle of upgrade process. What I'm
proposing now is to add another option or to modify -D for ignoring
CONFLICTS just like -D does for DEPENDS.

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index