1 |
On Fri, 2013-12-13 at 20:51 -0800, Matt Turner wrote: |
2 |
> On Fri, Dec 13, 2013 at 7:07 PM, Brian Dolbec <dolsen@g.o> wrote: |
3 |
> > Use the new configured snapshot_name and portdir settings |
4 |
> > Use the portdir setting rather than hard-coded path |
5 |
> > --- |
6 |
> > catalyst | 14 +++++++++----- |
7 |
> > modules/generic_stage_target.py | 6 ++++-- |
8 |
> > modules/snapshot_target.py | 14 +++++++++----- |
9 |
> > modules/tinderbox_target.py | 4 ++-- |
10 |
> > 4 files changed, 24 insertions(+), 14 deletions(-) |
11 |
> > |
12 |
> > diff --git a/catalyst b/catalyst |
13 |
> > index ba26f3c..19ec77e 100755 |
14 |
> > --- a/catalyst |
15 |
> > +++ b/catalyst |
16 |
> > @@ -61,11 +61,15 @@ def parse_config(myconfig): |
17 |
> > myconf={} |
18 |
> > config_file="" |
19 |
> > |
20 |
> > - confdefaults={ "storedir":"/var/tmp/catalyst",\ |
21 |
> > - "sharedir":"/usr/share/catalyst","distdir":"/usr/portage/distfiles",\ |
22 |
> > - "portdir":"/usr/portage","options":"",\ |
23 |
> > - "snapshot_cache":"/var/tmp/catalyst/snapshot_cache",\ |
24 |
> > - "hash_function":"crc32"} |
25 |
> > + confdefaults={ |
26 |
> > + "hash_function": "crc32", |
27 |
> > + "portdir": "/usr/portage", |
28 |
> > + "repo_name": "portage", |
29 |
> > + "sharedir": "/usr/lib/catalyst", |
30 |
> > + "snapshot_name": "portage-", |
31 |
> > + "snapshot_cache": "/var/tmp/catalyst/snapshot_cache", |
32 |
> > + "storedir": "/var/tmp/catalyst", |
33 |
> > + } |
34 |
> |
35 |
> I agree that adding a key:value to store "portage-" seems unnecessary. |
36 |
> I don't think we should do this unless someone has a compelling |
37 |
> reason. |
38 |
> |
39 |
|
40 |
Reasons for the change: |
41 |
|
42 |
1) it is bad design to have things hard-coded in many places throughout |
43 |
the code. |
44 |
|
45 |
2) this makes it one easy to edit and central place to change it. |
46 |
|
47 |
3) I feel the name is incorrect and I intend to lobby for it to be |
48 |
changed during the tree move from /usr/portage to the new location |
49 |
somewhere in /var (bikeshedding likely to continue on the final location |
50 |
once catalyst is actually capable of producing stages with and for the |
51 |
moved tree. Which is _the_ reason I got started coding on catalyst in |
52 |
the first place.). I regard portage as the name of the package manager |
53 |
and not the tree, the repo_name is "gentoo", not "portage". Plus it is |
54 |
likely to be less confusing for noobs first installing gentoo that get |
55 |
confused between portage the package manager and portage the tree. |
56 |
|
57 |
|
58 |
P.S. plus you didn't have to code it. It has been done for you ;) |
59 |
|
60 |
|
61 |
> Also, we lost "options" here. Is this intentional or consequential? |
62 |
> |
63 |
|
64 |
likely another rebase error. I did revamp the options system which had |
65 |
duplications all through the code. But I don't believe that should be |
66 |
showing up here. |
67 |
|
68 |
|
69 |
> > -- |
70 |
> > 1.8.3.2 |
71 |
> > |
72 |
> > |