1 |
Zac Medico posted on Wed, 12 Oct 2011 08:09:56 -0700 as excerpted: |
2 |
|
3 |
> On 10/12/2011 07:10 AM, Rich Freeman wrote: |
4 |
>> The defaults should be [safe] and the options should [flexibly |
5 |
>> allow less safety where judged necessary]. |
6 |
>> |
7 |
>> In my thinking the most conservative options right now are either |
8 |
>> emerge -uDN world or emerge -uDN --with-bdeps=y world. |
9 |
>> |
10 |
>> I'd almost prefer to see that -D, -N, and --with-bdeps go away, and |
11 |
>> that instead we add options like --shallow, --ignoreusechanges [...] |
12 |
|
13 |
>> I just think about Debian where you tell people run "apt-get update" |
14 |
>> and then "apt-get upgrade" and that is it. Their typical behavior is |
15 |
>> not specifying anything and you get everything updated. With Gentoo |
16 |
>> the equivalent is "emerge world" but when you do that you potentially |
17 |
>> miss a lot of stuff. |
18 |
>> |
19 |
>> (And I realize the --with-bdeps part of this is debatable.) |
20 |
|
21 |
I've privately thought similarly for quite some time, but rationalized |
22 |
it, as I expect many have, with the "gentoo isn't and never has been |
23 |
about babysitting" thing. We expect, even essentially demand, that our |
24 |
users actively assertively their own choices in such matters by choosing |
25 |
the options that make sense for them, because otherwise, there's |
26 |
basically no point to running the distro. |
27 |
|
28 |
But that doesn't mean we can't create a simple default that "just works" |
29 |
and is secure without all the arcane options. |
30 |
|
31 |
> How about if we add a `emerge --upgrade` target that is analogous to |
32 |
> `apt-get upgrade`? If we hide the new defaults behind a target like |
33 |
> --upgrade, rather than change the defaults globally, then it allows |
34 |
> people's existing scripted and habitual emerge commands to continue to |
35 |
> work in a backward compatible manner. |
36 |
|
37 |
This was exactly the point and suggestion that I expected Zac to make, |
38 |
and that I agree with just as strongly. Don't break existing working |
39 |
assumptions and scripts with new defaults, but do take advantage of the |
40 |
opportunity presented by this discussion to create a single sensible |
41 |
option that "just works" and does so safely. =:^) |
42 |
|
43 |
Meanwhile, Zac, if I may, another suggestion. In the manpage and other |
44 |
documentation of this option, specifically note that the intended purpose |
45 |
is a single option that "just works", and that as such, specific behavior |
46 |
of the option may change as portage itself changes. Thus, for scripts, |
47 |
etc, where unchanging specific behavior is intended, the individual |
48 |
specific options are recommended, instead. |
49 |
|
50 |
That way, a half decade or whatever down the line, when portage's best |
51 |
defaults have again changed, we won't be faced with the problem of |
52 |
creating a new "best single default option" to avoid breaking existing |
53 |
assumptions, because the explicit assumption about this option is that it |
54 |
will always do what's considered best, even if that changes its behavior |
55 |
over time, and people have the option of picking either unchanging |
56 |
behavior with individual options, if that's desired, or a single option |
57 |
that's always intended to give the best behavior, even if that changes |
58 |
over time. |
59 |
|
60 |
In that regard, perhaps call the option --best, or some such, so it can |
61 |
be used for upgrades, fetches, or whatever, and can be suggested for |
62 |
EMERGE_DEFAULT_OPTS, where --upgrade might not always be appropriate. |
63 |
|
64 |
Also, make it possible to override what --best might otherwise do with |
65 |
later options. So a command including --best --with-bdeps=n in that |
66 |
order would do what --best would do, except --with-bdeps=n would override |
67 |
it for that specific option. (Conversely, --with-bdeps=n --best would |
68 |
ignore the bdeps option since best overrode it.) |
69 |
|
70 |
-- |
71 |
Duncan - List replies preferred. No HTML msgs. |
72 |
"Every nonfree program has a lord, a master -- |
73 |
and if you use the program, he is your master." Richard Stallman |