1 |
Hi! |
2 |
|
3 |
I wanted to send the patches for gnap i made so far. I don't know what i |
4 |
screwed up, but somehow they do not apply cleanly. I send them anyway for |
5 |
review, if anybody wants i can send my current gnap_* scripts or recreate |
6 |
working patches. |
7 |
|
8 |
I will send the patcehs as replies to this email (since they are mostly |
9 |
for review). |
10 |
|
11 |
01-split-gnap_make.patch |
12 |
02-split-gnap_overlay.patch |
13 |
03-split-gnap_remaster.patch |
14 |
|
15 |
Theese first 3 patches take the common stuff (functions, constants) from |
16 |
the gnap_* scripts and put it into gnap_shared.sh |
17 |
|
18 |
Note: |
19 |
1) There are 2 gnap_shared.sh so far, one in the src and one in the toos |
20 |
directory of the gnap svn tree. This should maybe be changed... |
21 |
2) The gnap_* scripts do 'source "gnap_shared.sh"', which is probably not |
22 |
good. In which directory will we put gnap_shared.sh? |
23 |
|
24 |
04-feature-gnap_make-T.patch |
25 |
05-festure-gnap_overlay-T.patch |
26 |
06-feature-gnap_remaster-T.patch |
27 |
07-split-make_tempdir.patch |
28 |
|
29 |
After i created the first patch (with which it is possible to specify a |
30 |
temp directory for gnap_make) i did the same for the other scripts and put |
31 |
the logic in gnap_shared.sh finally. For the moment this is to prevent |
32 |
using too small temp directories, later i want to create an option to |
33 |
prevent deleting special files that they can be used after a gnap run. I |
34 |
already talked about this. |
35 |
|
36 |
08-namespace-gnap_shared.patch |
37 |
|
38 |
This cleanes up the namespace, all variables that are used as input |
39 |
parameters in gnap_shared.sh are prefixed with GNAP_ to get a clean usage |
40 |
of the namespace. More to that later. |
41 |
|
42 |
09-cleanup-gnap_make.patch |
43 |
|
44 |
Some small fixes for gnap_make. |
45 |
|
46 |
|
47 |
Ok, so far, so good. What's next? |
48 |
|
49 |
1) Configuring gnap |
50 |
|
51 |
At the moment configuring gnap_make (at which i concentrate so far) is |
52 |
quite a mess. We have default parameters (in gnap_shared.sh), we have |
53 |
catalyst.conf and commons.conf which we simply source, we have command |
54 |
line options. At the moment this means the following: |
55 |
|
56 |
Default options are set first, then they are overwritten by command line |
57 |
options, which are overwritten by common.conf, ehich are overwritten by |
58 |
catalyst.conf. |
59 |
|
60 |
This is not really clean. For example, we use CATALYST_TEMP_DIR in |
61 |
common.conf, catalyst uses store_dir in catalyst.conf. This is redundant |
62 |
and does not make it clean. The default common.conf also defines |
63 |
CATALYST_CONF (which might be broken because i renamed it, i have to |
64 |
check), but that means that the command line option for specifying |
65 |
catalyst.conf does not work if this is not commented out. |
66 |
|
67 |
So... do we want to change this? I would like something like: |
68 |
|
69 |
We can use variables from the environment. This will only be valid for |
70 |
GNAP_* variables, so we have a clear namespace and it enables people to |
71 |
set default variables. I'm not sure, how much this will be needed/used, |
72 |
but it sounds like an interesting feature. The catalyst.conf is only used |
73 |
for catalyst configuration (interaction between gnap and catalyst), |
74 |
therefore it does never make sense to overwrite information given there. |
75 |
|
76 |
Default options < environment < common.conf < command line options. |
77 |
|
78 |
This would be my prefered way of configuring gnap, where variables from |
79 |
sources more right overwrite variables from sources more left. |
80 |
|
81 |
2) gnap_make feature: pretend |
82 |
|
83 |
I'd like a --pretend feature for gnap_make which lets it just create the |
84 |
configuration files for catalyst and the source files (portage tree, from |
85 |
tree snapsht and overlays). This might be useful for test runs, |
86 |
development and usage of catalyst features gnap does not support. This |
87 |
could be implemented by simply overwriting CATALYST_BIN with "echo |
88 |
$CATALYSY_BIN", if 1) from above is clear. |
89 |
|
90 |
3) gnap_make feature: improved overlay handling |
91 |
|
92 |
The overlay handling of gnap_make is some kind of bug, i think. If you |
93 |
don't take care, Manifests are broken. Therefore i want to change it that |
94 |
packages (directories in which ebuilds are) are first deleted from the |
95 |
tree and metadata/cache if they exist, before new ones from overlays are |
96 |
added. This should be easy to understand, since people usually don't need |
97 |
stuff from the tree anymore if they use an overlay for a specific package. |
98 |
|
99 |
4) some small stuff |
100 |
|
101 |
At the moment, if there is a choice (Overwrite/Append, Yes/No) only one |
102 |
possibility is checked and the other is assumed, if the one is not given. |
103 |
I'd like to change this to something like "It is asked in a loop until a |
104 |
valid option is given." |
105 |
|
106 |
There is a function gwarn, writes to stderr. It is used in some places |
107 |
where ginfo would make more sence, if it would exist. I'd like to |
108 |
implement and use this. |
109 |
|
110 |
|
111 |
|
112 |
That's all i wanted to say about the gnap_scripts at the moment. |
113 |
|
114 |
Philipp |
115 |
-- |
116 |
gnap-dev@g.o mailing list |