public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Wols Lists <antlists@youngman.org.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] A portage nuisance
Date: Sun, 29 Oct 2017 01:10:03 +0100	[thread overview]
Message-ID: <59F51C5B.40609@youngman.org.uk> (raw)
In-Reply-To: <20171029014528.d1d1ab810ecb1c3bbe02b835@gentoo.org>

On 28/10/17 23:45, Andrew Savchenko wrote:
>> emerge -u world
>> > A will be emerged with options ...
>> > B will be emerged with options ...
>> > C will be emerged with options ...
>> > D is blocked by E
>> > F will be emerged with options ...
>> > G is blocked by H
>> > Giving up, too many circular dependencies
>> > emerge A B C F
> Ah, man, this is where your mistake is. You are assuming that it
>  is possible to get a correct dependency subgraph without building
> full correct dependency graph first. This is not possible and this
> is math. While the approach you described abode may work in some
> practical cases, it will be busted in general case.
> 
> The key moment here is that graph's root node may be changed during
> dependency recalculation based on _how_ conflict is solved, the
> same as all other nodes may be reordered. And dependencies which
> appear to be valid before conflict is resolved may became invalid
> after, consider the following dep tree:
> 
>   A
>  / \
> B   C
>     |
>  !{D,E}
> 
> - B and C depends on A;
> - D conflicts with E and both depend on C;
> 
> You assume that !{D,E} conflict can be skipped and A, B, C canbe
> emerged. But let's assume that you selected D later, but D depends
> on F and F conflicts with A[some_flag]. So you'll have to choose
> some alternative to A or change its USE flags, this may require to
> rebuild the whole dependency tree (and build order may change as
> well). In order to prevent dozens (sometimes hundreds or even
> thousands) of useless rebuilds and to avoid leaving intermediate
> tree in the utterly broken state emerge fails if it can't build the
> dependency graph.

EXCEPT.

My "emerge A B C F" will presumably then fail with those conflicts, and
it will loop again and just do an "emerge A".

I'm not saying "prune the graph first time, then just emerge
everything". I'm saying "prune the graph, and try again with the reduced
set".

Thing is, I have always found that deleting blockers "emerge -C1", and
emerging everything that I can get to emerge, is almost guaranteed to
end up with a system where everything eventually emerges.

The problem I have is that, if I delay updating (or something like kde
with its gazillions of packages is upgraded), I end up with maybe 300
packages to be emerged. Trying to sort that mess out is a nightmare
especially when emerge starts blowing up with circular dependencies and
stuff, and old packages blocking new ones - "A version 2 is blocked by A
version 1" etc etc. And all too often deleting the current version A
(and the other packages - slated for replacement - that depend on A)
fixes the problem.

I think we're having a misunderstanding here. If emerge does what I'm
asking for, and leaves the system in a broken state (as you seem to
think it will), then that's a serious bug in emerge. You seem to think
I'm asking emerge to prune the dependency tree - I'm not. I'm asking for
it to prune the package list - if it can't sort out dependencies, drop
that package from the package list and then, when it's got a list of
packages that it thinks will work, go back to the start and try to
emerge just those (calculating a new dependency tree).

In other words, I'm asking emerge to automate what I do - look at the
output, find a subset of packages that I think will work, and then ask
it to try again with just those packages. I would be very surprised if
it iterated repeatedly down to the null set.

As for doing useless rebuilds, isn't that MY call, not yours? What is
most valuable - my time, or my computer's time? As it stands, I have to
babysit an emerge - calculating the full graph bombs, so I have to try
to emerge a small subset, which might bomb, and when that works I try
again with the full set that bombs, so I have to iterate again, ad
nauseam ... I like to work on the principle "if the computer can
automate what I do, then it should ..."

What would you recommend as the best way (for somebody who's knowledge
of gentoo is patchy) of dealing with the situation when an emerge blows
up with loads of circular dependencies finishing with the message "too
many errors, giving up"? As opposed to my way of "emerge what I can,
then see what more emerges", which I have always found eventually fixes
everything.

Cheers,
Wol


  reply	other threads:[~2017-10-29  0:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27 12:52 [gentoo-user] A portage nuisance Helmut Jarausch
2017-10-27 13:58 ` Peter Humphrey
2017-10-28 14:52   ` Andrew Savchenko
2017-10-28 17:58     ` Wols Lists
2017-10-28 19:54       ` Alan McKinnon
2017-10-28 20:39         ` Anthony Youngman
2017-10-28 20:50           ` Alan McKinnon
2017-10-28 21:59             ` Anthony Youngman
2017-10-28 22:45               ` Andrew Savchenko
2017-10-29  0:10                 ` Wols Lists [this message]
2017-10-29  0:58                   ` Michael Orlitzky
2017-10-27 15:18 ` Alan McKinnon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59F51C5B.40609@youngman.org.uk \
    --to=antlists@youngman.org.uk \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox