Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH 1/2] As per bug #472104 add option --verbose-slot-rebuilds=y|n
Date: Sun, 23 Feb 2014 18:43:49
Message-Id: 20140223103917.3116a872.dolsen@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH 1/2] As per bug #472104 add option --verbose-slot-rebuilds=y|n by Sebastian Luther
1 On Sun, 23 Feb 2014 18:31:54 +0100
2 Sebastian Luther <SebastianLuther@×××.de> wrote:
3
4 > Am 23.02.2014 09:07, schrieb Brian Dolbec:
5 > > ---
6 > > pym/_emerge/actions.py | 5 +++++
7 > > pym/_emerge/depgraph.py | 5 +++--
8 > > pym/_emerge/main.py | 5 +++++
9 > > pym/portage/package/ebuild/config.py | 3 +++
10 > > 4 files changed, 16 insertions(+), 2 deletions(-)
11 > >
12 > > diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
13 > > index 95c5c14..a3f7813 100644
14 > > --- a/pym/_emerge/actions.py
15 > > +++ b/pym/_emerge/actions.py
16 > > @@ -2923,6 +2923,11 @@ def adjust_config(myopts, settings):
17 > > settings["PORTAGE_VERBOSE"] = "1"
18 > > settings.backup_changes("PORTAGE_VERBOSE")
19 > >
20 > > + if ("--verbose-slot-rebuilds" in myopts and
21 > > + myopts["--verbose-slot-rebuilds"] not in ("y","True")):
22 > > + settings["VERBOSE_SLOT_REBUILDS"] = "0"
23 > > + settings.backup_changes("VERBOSE_SLOT_REBUILDS")
24 >
25 > Why do you put that into the config class? In the resolver you should
26 > just do:
27 > if "--verbose-slot-rebuilds" in self._frozen_config.myopts:
28 >
29 > Otherwise looks good.
30 >
31
32 It is a command line option. This is where all the other command line
33 options were defined. How else is a user going to toggle the option?
34
35
36 And here I was worried about where to define the default... since it
37 needs to be defined depgraph.py, I ended up putting it in
38 pym/portage/package/ebuild/config.py. That seemed to be the default config.
39 But since depgraph.py is an _emerge namespace lib, if there is a better
40 place for it. Please speak up.
41
42 --
43 Brian Dolbec <dolsen>