public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michael Orlitzky <mjo@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [RFC] Global USE=gui
Date: Tue, 7 Jun 2016 17:31:49 -0400	[thread overview]
Message-ID: <57573D45.3010100@gentoo.org> (raw)
In-Reply-To: <20160607225942.7b1c8cc3.mgorny@gentoo.org>

On 06/07/2016 04:59 PM, Michał Górny wrote:
>>
>> I'll believe this when I see it =P
> 
> You won't because the Gentoo way is to create a shitload of hacks
> instead of fixing the root issue.
> 

I'm not arguing for anything here, I'm just toying around with an idea
for fun. What we want is a way to declare USE flag constraints within an
ebuild that,

  1) Runs quickly
  2) Prevents a package from being installed with conflicting flags
  3) Preferably has a simple grammar and doesn't require bash
  4) Outputs a sensible message to the user upon conflict

The error message is the one clear point that pkg_pretend holds over
REQUIRED_USE. If we can make portage do something sensible when it hits
a REQUIRED_USE conflict, that would be ideal. But aren't (2) and (4) the
most important points?


>>
>> So 7 minutes for an understandable English description of the error and
>> how to fix it, versus 5 minutes for line noise? There's a great story in
>> The Psychology of Computer Programming that ends like this:
> 
> Not 5 minutes. Depending on the context, Portage can complain about
> REQUIRED_USE in a few seconds because it has no further point
> in evaluating the depgraph.
> 

It doesn't do this, does it? I think it waits until the end. It *could*
run pkg_pretend earlier, too, but it doesn't.


> 
>>> 3. REQUIRED_USE can take USE dependencies into account. pkg_pretend()
>>> can't.  
>>
>> What do you mean here?
> 
> I mean that if A depends on B[gtk2], and you have ^^ ( gtk2 gtk3 ),
> Portage will clearly know gtk2 is the only solution. Your pkg_pretend()
> will tell user to enable gtk3, then Portage will hit unsolvable deps.
> Congratulations, your helpful output just resulted in even worse
> output!
> 

gtk2 is not the only solution: I could set B[gtk2] and A[gtk3] in
package.use. (If gtk2 *were* the only solution, then why would you have
the REQUIRED_USE in the first place? Just pass --with-gtk2.)

In practice, I would set A[gtk3] in package.use, and then try to emerge
it again. Portage would tell me that I needed to set B[gtk2] first, and
I would do that and start over.


>> See #2, but "each package" is an overestimate. Only the ones with a
>> non-trivial pkg_pretend() phase would take any time.
> 
> Have you tried it, or is it wild guess? What I'm saying is that
> *pkg_pretend implementation in Portage is TERRIBLY SLOW*. Even
> a complete no-op takes a lot of time because Portage needs to do a lot
> of setup to run it, and can't do multiple packages in parallel.
> 

Of course I haven't tried it =)

One of two scenarios holds, though:

 * if a trivial pkg_pretend() is slow, then one that checks for USE
   flag conflicts isn't actually that much slower.

 * if a trivial pkg_pretend() is fast, then only those packages that
   have a non-trivial pkg_pretend() make it slower.

REQUIRED_USE should be faster either way, but that's currently at the
expense of the error messages and I'm not sure those *can* be fixed.



  parent reply	other threads:[~2016-06-07 21:32 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01 14:29 [gentoo-dev] [RFC] Global USE=gui Mart Raudsepp
2016-06-01 15:19 ` NP-Hardass
2016-06-01 15:26   ` Damien Levac
2016-06-01 16:52   ` Ian Stakenvicius
2016-06-01 16:59     ` NP-Hardass
2016-06-01 17:49       ` Raymond Jennings
2016-06-01 16:15 ` Daniel Campbell (zlg)
2016-06-01 16:21 ` Michał Górny
2016-06-01 16:36   ` NP-Hardass
2016-06-01 16:55   ` Daniel Campbell
2016-06-01 17:53 ` waltdnes
2016-06-01 17:56   ` Michał Górny
2016-06-02  2:13     ` waltdnes
2016-06-02  5:31       ` Michał Górny
2016-06-02  5:50       ` Graham Murray
2016-06-02 19:36         ` waltdnes
2016-06-03  8:52           ` Michał Górny
2016-06-03 15:44             ` Patrick Lauer
2016-06-02 13:31       ` Damien Levac
2016-06-02 19:42         ` waltdnes
2016-06-02 19:57           ` Damien Levac
2016-06-02 21:27             ` Daniel Campbell
2016-06-02 21:55               ` Rich Freeman
2016-06-03  1:18                 ` Daniel Campbell
2016-06-03 13:06               ` Damien Levac
2016-06-03 14:22                 ` Gordon Pettey
2016-06-03 14:15               ` Ian Stakenvicius
2016-06-02 20:25           ` Ian Stakenvicius
2016-06-02 20:37             ` waltdnes
2016-06-02 20:46               ` Michał Górny
2016-06-02 21:20                 ` Igor Savlook
2016-06-02 21:29                   ` Rich Freeman
2016-06-02 21:21                 ` Rich Freeman
2016-06-05  1:58                   ` NP-Hardass
2016-06-02 21:41                 ` Daniel Campbell
2016-06-02 14:20       ` Ian Stakenvicius
2016-06-02 15:08         ` Raymond Jennings
2016-06-03  1:48           ` Nick Vinson
2016-06-03 14:35             ` Ian Stakenvicius
2016-06-03 19:34               ` waltdnes
2016-06-03 20:13                 ` Alan McKinnon
2016-06-03 20:23                   ` M. J. Everitt
2016-06-03 21:33                   ` Nick Vinson
2016-06-03 22:18                     ` Alan McKinnon
2016-06-04  4:24                     ` Michał Górny
2016-06-04  3:26               ` Nick Vinson
2016-06-04  4:07                 ` Ian Stakenvicius
2016-06-04  5:40                   ` Daniel Campbell
2016-06-05  3:07                     ` Mart Raudsepp
2016-06-06 14:53                     ` Ian Stakenvicius
2016-06-07  9:19                       ` Patrick Lauer
2016-06-07  9:27                         ` James Le Cuirot
2016-06-07 11:23                           ` Alexander Berntsen
2016-06-07 11:27                             ` James Le Cuirot
2016-06-07 11:29                               ` Alexander Berntsen
2016-06-07 14:19                         ` Ian Stakenvicius
2016-06-07 14:22                           ` Ian Stakenvicius
2016-06-07 16:20                       ` Michał Górny
2016-06-07 18:29                         ` Michael Orlitzky
2016-06-07 19:03                           ` Brian Dolbec
2016-06-07 21:44                             ` David Seifert
2016-06-07 22:26                             ` Rich Freeman
2016-06-09 16:32                             ` Michał Górny
2016-06-09 20:24                               ` Ulrich Mueller
2016-06-09 20:42                                 ` Michał Górny
2016-06-09 20:50                                   ` Chí-Thanh Christopher Nguyễn
2016-06-09 22:18                                   ` Ulrich Mueller
2016-06-10 12:29                                     ` Ciaran McCreesh
2016-06-10 12:50                                       ` Ulrich Mueller
2016-06-07 18:50                         ` Michael Orlitzky
2016-06-07 18:57                           ` Michał Górny
2016-06-07 20:31                             ` Michael Orlitzky
2016-06-07 20:59                               ` Michał Górny
2016-06-07 21:06                                 ` Ciaran McCreesh
2016-06-07 21:31                                 ` Michael Orlitzky [this message]
2016-06-08  6:34                                   ` Michał Górny

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=57573D45.3010100@gentoo.org \
    --to=mjo@gentoo.org \
    --cc=gentoo-dev@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