Gentoo Archives: gentoo-council

From: Luca Barbato <lu_zero@g.o>
To: Ryan Hill <dirtyepic@g.o>
Cc: gentoo-council@l.g.o
Subject: Re: [gentoo-council] Re: Comparison of GLEP 54 and 'live ebuild' proposal
Date: Thu, 12 Mar 2009 13:57:05
Message-Id: 49B914A9.3040008@gentoo.org
In Reply to: [gentoo-council] Re: Comparison of GLEP 54 and 'live ebuild' proposal by Ryan Hill
1 Ryan Hill wrote:
2 > On Wed, 11 Mar 2009 10:55:52 +0100
3 > Luca Barbato <lu_zero@g.o> wrote:
4 >
5 >> Ryan Hill wrote:
6 >>> I have some questions about the -live proposal. I'm sorry if some
7 >>> of this has been answered already; I haven't had the opportunity to
8 >>> follow it more closely.
9 >>>
10 >>> The draft (http://dev.gentoo.org/~lu_zero/glep/liveebuild.rst) says
11 >>> that "At resolution the live keyword is substituted with a
12 >>> timestamp in the form of iso date". What is meant by "resolution"
13 >>> here? Does this mean that, having a gcc-4.4.0_prelive ebuild,
14 >>> 'emerge -p gcc' would show something like:
15 >>>
16 >>> [ebuild U ] sys-devel/gcc-4.4.0_pre20090310
17 >>>
18 >>> If so, is there any way to identify that this is a live ebuild?
19 >> The ebuild itself has some embedded information so portage
20 >> could/should provide something like.
21 >>
22 >> [ebuild U ] sys-devel/gcc-4.4.0_pre20090310 [from svn master
23 >> r12345]
24 >
25 > As you said in another mail, this could only be shown for a rebuild,
26 > but not an update, true?
27
28 on update you'd have the ref to the live template as in
29
30 [ebuild U ] sys-devel/gcc-4.4.0_prelive
31
32 Having src_fetch trigged by pretend is wrong.
33
34 >>> If I have an eclass that needs to do stuff to only live ebuilds
35 >>> (like kde4-base.eclass setting SLOT=live when PV is 9999), how can I
36 >>> differentiate between live ebuilds and snapshots? Do eclasses see
37 >>> -live or the expanded datestamp in PV?
38 >> it see the expanded datestamp but sees also LIVE_URI LIVE_REVISION
39 >> LIVE_BRANCH (the variables that keep track of the exact revision of
40 >> the sources you are going to use), so you can also slot by branch
41 >>
42 >> SLOT=${LIVE_BRANCH}
43 >
44 > Yeah, immediately after posting I remembered there would be certain
45 > variables present. Even if they weren't you could just stick a
46 > LIVE="yes" in the live ebuilds or check PROPERTIES or whatever.
47
48
49 Yes
50
51 >>> How do I know if a user has a live ebuild installed when they file a
52 >>> bug without having to check if there's a snapshot with that date in
53 >>> the tree every single time the PV has a datestamp in it? (minor
54 >>> gripe admittedly)
55 >> He will provide the revision and branch so you have more information
56 >> not less.
57 >>
58 >>> If I build a live package today, will I see it as an update when
59 >>> running emerge -pu @world tomorrow?
60 >> the template will be evaluated again so you get another snapshot
61 >> proposed for update.
62 >
63 > Ooh, i really don't like that. This would force me to either do daily
64 > updates manually package by package or mask any live ebuilds before i
65 > do. That would _really_ suck if I were still running the kde-crazy
66 > overlay and had 50+ live ebuilds installed.
67
68 Well the alternative is to have the installed live templates reside in
69 @live.
70
71 >>> If I have 20090309 installed what does 'emerge
72 >>> =gcc-4.4.0_pre20090309' do tomorrow? (It might be a neat trick to
73 >>> disable fetch and just rebuild the current checkout in this case.)
74 >> it will try to build the exact revision it used by the time you
75 >> issued the previous emerge.
76 >
77 > Cool.
78 >
79 >>> Does 'emerge =gcc-4.4.0_pre<date>' even work, or just `..._prelive`?
80 >> =gcc-4.4.0_pre<date> will try to reinstall what you installed by
81 >> <date>
82 >
83 > Will a list of date -> revision mappings be kept? Where is this info
84 > stored?
85
86 the same way USE or SLOT variables are stored.
87
88 >
89 >> =gcc-4.4.0_prelive will get resolved out of the template and then
90 >> installed as =gcc-4.4.0_pre<now>
91 >>
92 >>> Does the user at any point ever see "live" in the ebuild version or
93 >>> is it always replaced by the date? If the latter, how do users
94 >>> know they have to put '=sys-devel/gcc-4.4.0_prelive' in package.*
95 >>> and not pre<date>?
96 >> the user will get the version render but also from where it is
97 >>
98 >>> Are there any facilities to allow a user to checkout a specific
99 >>> revision from the repo, or is that beyond the scope of this GLEP?
100 >>> If we ever do implement such a thing, it seems like the datestamp
101 >>> approach wouldn't mesh well; 20090310 doesn't make much sense when
102 >>> the revision is from a month ago.
103 >> if you want to checkout a specific revision from the repo you aren't
104 >> creating a live ebuild but a snapshot with a specific src uri.
105 >>
106 >> so you don't use a template but just the specific eclasses and mark
107 >> the ebuild so you can show up on emerge -p the informations as stated
108 >> above.
109 >
110 > I was thinking about dynamic revisions, where the user could do
111 > something like 'emerge -av gcc --rev 123456'. I just checked a couple
112 > eclasses and it seems we already have this feature, for example
113 > ESVN_REVISION in subversion.eclass, so let's abandon this train of
114 > thought. ;)
115
116 Could be interesting adding it later, it would depend in a standard
117 interface for live eclasses as well.
118
119 > Thanks for your answers. I'd like to think about it a bit, but off the
120 > top of my head what would you say to a hybrid approach where the ebuild
121 > doesn't have the datestamp expansion on resolution, but rather this
122 > information were available after building? In all cases, the ebuild
123 > would be referred to by its proper name (ie. gcc-4.4.0_pre.live), but
124 > enough information would be recorded at build time so the package
125 > manager could do groovy things like
126 >
127 > [ebuild U ] sys-devel/gcc-4.4.0_pre.live (last built 20090310 - rev.
128 > 14991) USE="use -flags"
129 >
130 > and
131 >
132 > # emerge --info gcc
133 >
134 > sys-devel/gcc-4.4.0_pre9999 was built with the following:
135 > CFLAGS="-O2 -march=core2 -pipe"
136 > CXXFLAGS="-O2 -march=core2 -pipe"
137 >
138 >>>> Attempting to run pkg_info() for 'sys-devel/gcc-4.4.0_pre9999'
139 >
140 > svn: 20081206 23:31:22 - gcc-4.3.3_pre9999:4.3-svn was merged at revision 142535
141 > svn: 20090123 17:09:12 - gcc-4.4.0_pre9999:4.4-svn was merged at revision 143592
142 > svn: 20090131 16:35:23 - gcc-4.4.0_pre9999:4.4-svn was merged at revision 143833
143 > svn: 20090131 17:05:29 - gcc-4.4.0_pre9999:4.4-svn was merged at revision 143834
144 > svn: 20090223 00:33:50 - gcc-4.4.0_pre9999:4.4-svn was merged at revision 144379
145 > svn: 20090226 22:10:09 - gcc-4.4.0_pre9999:4.4-svn was merged at revision 144460
146 > svn: 20090226 23:00:57 - gcc-4.3.3_pre9999:4.3-svn was merged at revision 144460
147 > svn: 20090304 20:16:48 - gcc-4.4.0_pre9999:4.4-svn was merged at revision 144634
148 > svn: 20090307 15:12:27 - gcc-4.4.0_pre9999:4.4-svn was merged at revision 144702
149 >
150 > (note the latter is already possible with zero modifications to anything)
151 >
152 > It seems to me that the datestamp expansion is a lot of complication
153 > for very little gain.
154
155 There is some gain, still probably we could start implementing the rest
156 first and then decide later about that detail.
157
158 >> - you cannot do exact reemerges and that may break revdep-rebuild
159 >
160 > You can use eclass features that skip the updating phase and just build the
161 > current sources (eg. ESVN_OFFLINE). And as I mentioned above, some can
162 > build a specific revision.
163
164 That would work only if you aren't keeping different slots, looks like
165 standardizing eclasses and having portage exporting those data is
166 getting something we could consider alone. That gets problematic with
167 multislot we either have to rely on templates or try to support better
168 multislot otherwise.
169
170 >> - the package manager isn't aware of the "liveness" condition.
171 >
172 > Solved by both this and the -scm GLEP.
173 >
174 >> - in order to refresh/update the installed package automatically you
175 >> need either to rely on script or on sets hand produced or
176 >> heuristically defined (e.g "all ebuilds that inherit eclass svn go in
177 >> svn set").
178 >
179 > Do people really want live ebuilds updating automatically? It sounds
180 > like a recipe for breakage. I don't want live sources updating until
181 > i explicitly tell them to, but maybe that's just me. If someone does
182 > want this behaviour, I'd suggest using cron. Also, doesn't portage have
183 > a @live-rebuild set that makes this trivial?
184
185 Sure, that is a point that need to be considered thoroughly. I think
186 everybody agrees that the default behavior should be conservative.
187
188 >> - since you fetch on unpack phase you cannot use emerge --fetch
189 >> consistently.
190 >
191 > How does either proposal address this?
192 >
193 > In the end, I don't see anything that datename expansion does that
194 > can't be done more easily and less confusingly with other techniques.
195
196 The proposal requires src_fetch implemented so emerge -f will work as
197 expected about fetching the sources, then you can either rely on
198 variable/custom command or on the template generation to have portage
199 pick it. So, yes, you can do it in other ways, both have to be
200 implemented somehow.
201
202 > Is there a specific problem it solves that can't be addressed through
203 > other means?
204
205 The templating part alone is useful to get snapshot and binpkg easily,
206 having pkg-scm or pkg-9999 isn't as descriptive as pkg-${a definite time}.
207
208 Thank you again for the ideas and proposals =)
209
210 lu
211
212 --
213
214 Luca Barbato
215 Gentoo Council Member
216 Gentoo/linux Gentoo/PPC
217 http://dev.gentoo.org/~lu_zero