Mercurial > hgbook
comparison es/mq-collab.tex @ 593:f89480678965
translated section 13.7
author | Javier Rojas <jerojasro@devnull.li> |
---|---|
date | Wed, 07 Jan 2009 23:19:40 -0500 |
parents | 795f2964e104 |
children | dfa2890d9b30 |
comparison
equal
deleted
inserted
replaced
591:b7b6a085056e | 593:f89480678965 |
---|---|
181 \interaction{mq.guards.qselect.quux} | 181 \interaction{mq.guards.qselect.quux} |
182 Usted puede ver en el ejemplo de abajo que los guardias negativos | 182 Usted puede ver en el ejemplo de abajo que los guardias negativos |
183 tienen precedencia sobre los guardias positivos. | 183 tienen precedencia sobre los guardias positivos. |
184 \interaction{mq.guards.qselect.foobar} | 184 \interaction{mq.guards.qselect.foobar} |
185 | 185 |
186 \section{MQ's rules for applying patches} | 186 \section{Reglas de MQ para aplicar parches} |
187 | 187 |
188 The rules that MQ uses when deciding whether to apply a patch | 188 Las reglas que MQ usa para decidir si debe aplicar un parche son las |
189 are as follows. | 189 siguientes. |
190 \begin{itemize} | 190 \begin{itemize} |
191 \item A patch that has no guards is always applied. | 191 \item Un parche sin guardias es aplicado siempre. |
192 \item If the patch has any negative guard that matches any currently | 192 \item Si el parche tiene algún guardia negativo que corresponda con |
193 selected guard, the patch is skipped. | 193 cualquiera de los guardias seleccionados, se salta el parche. |
194 \item If the patch has any positive guard that matches any currently | 194 \item Si el parche tiene algún guardia positivo que corresponda con |
195 selected guard, the patch is applied. | 195 cualquiera de los guardias seleccionados, se aplica el parche. |
196 \item If the patch has positive or negative guards, but none matches | 196 \item Si el parche tiene guardias positivos o negativos, pero ninguno |
197 any currently selected guard, the patch is skipped. | 197 corresponde con cualquiera de los guardias seleccionados, se salta |
198 el parche. | |
198 \end{itemize} | 199 \end{itemize} |
199 | 200 |
200 \section{Trimming the work environment} | 201 \section{Podar el entorno de trabajo} |
201 | 202 |
202 In working on the device driver I mentioned earlier, I don't apply the | 203 En el trabajo del controlador de dispositivo que mencioné |
203 patches to a normal Linux kernel tree. Instead, I use a repository | 204 anteriormente, yo no aplico los parches a un árbol normal del kernel |
204 that contains only a snapshot of the source files and headers that are | 205 de Linux. En cambio, uso un repositorio que sólo contiene una |
205 relevant to Infiniband development. This repository is~1\% the size | 206 instantánea de los ficheros fuente y de cabecera que son relevantes |
206 of a kernel repository, so it's easier to work with. | 207 para el desarrollo de Infiniband. Este repositorio tiene un~1\% del |
207 | 208 tamaño del repositorio del kernel, por lo que es más fácil trabajar |
208 I then choose a ``base'' version on top of which the patches are | 209 con él. |
209 applied. This is a snapshot of the Linux kernel tree as of a revision | 210 |
210 of my choosing. When I take the snapshot, I record the changeset ID | 211 Luego escojo una versión ``base'' sobre la cual son aplicados los |
211 from the kernel repository in the commit message. Since the snapshot | 212 parches. Es una instantánea del árbol del kernel de Linux en una |
212 preserves the ``shape'' and content of the relevant parts of the | 213 revisión de mi elección. Cuando tomo la instantánea, almaceno el ID de |
213 kernel tree, I can apply my patches on top of either my tiny | 214 conjunto de cambios en el mensaje de consignación. Ya que la |
214 repository or a normal kernel tree. | 215 instantánea preserva la ``forma'' y el contenido de las partes |
215 | 216 relevantes del árbol del kernel, puedo aplicar mis parches sobre mi |
216 Normally, the base tree atop which the patches apply should be a | 217 pequeño repositorio o sobre un árbol normal del kernel. |
217 snapshot of a very recent upstream tree. This best facilitates the | 218 |
218 development of patches that can easily be submitted upstream with few | 219 Normalmente, el árbol base sobre el que se aplican los parches debería |
219 or no modifications. | 220 ser una instantánea de un árbol de desarrollo muy reciente. Esto |
220 | 221 facilita mucho el desarrollo de parches que puedan ser enviados al |
221 \section{Dividing up the \sfilename{series} file} | 222 árbol oficial con pocas o ninguna modificación. |
222 | 223 |
223 I categorise the patches in the \sfilename{series} file into a number | 224 \section{Dividir el fichero \sfilename{series}} |
224 of logical groups. Each section of like patches begins with a block | 225 |
225 of comments that describes the purpose of the patches that follow. | 226 Yo categorizo los parches en el fichero \sfilename{series} en una |
226 | 227 serie de grupos lógicos. Cada sección de parches similares empieza con |
227 The sequence of patch groups that I maintain follows. The ordering of | 228 un bloque de comentarios que describen el propósito de los parches que |
228 these groups is important; I'll describe why after I introduce the | 229 le siguen. |
229 groups. | 230 |
231 La secuencia de grupos de parches que mantengo se muestra a | |
232 continuación. El orden de los grupos es importante; explicaré porqué | |
233 luego de que presente los grupos. | |
230 \begin{itemize} | 234 \begin{itemize} |
231 \item The ``accepted'' group. Patches that the development team has | 235 \item El grupo ``aceptado''. Son parches que el equipo de desarrollo |
232 submitted to the maintainer of the Infiniband subsystem, and which | 236 ha enviado al mantenedor del subsistema Infiniband, y que él ha |
233 he has accepted, but which are not present in the snapshot that the | 237 aceptado, pero que no están presentes en la instantánea en la cual |
234 tiny repository is based on. These are ``read only'' patches, | 238 está basada el repositorio pequeño. Estos son parches de |
235 present only to transform the tree into a similar state as it is in | 239 ``sólo lectura'', presentes únicamente para transformar el árbol en |
236 the upstream maintainer's repository. | 240 un estado similar al del repositorio del mantenedor oficial. |
237 \item The ``rework'' group. Patches that I have submitted, but that | 241 \item El grupo ``revisar''. Parches que yo he enviado, pero sobre los |
238 the upstream maintainer has requested modifications to before he | 242 que que el mantenedor oficial ha solicitado modificaciones antes de |
239 will accept them. | 243 aceptarlos. |
240 \item The ``pending'' group. Patches that I have not yet submitted to | 244 \item El grupo ``pendiente''. Parches que no he enviado al mantenedor |
241 the upstream maintainer, but which we have finished working on. | 245 oficial, pero que ya están terminados. Estos parches serán de |
242 These will be ``read only'' for a while. If the upstream maintainer | 246 ``sólo lectura'' por un buen tiempo. Si el mantenedor oficial los |
243 accepts them upon submission, I'll move them to the end of the | 247 acepta cuando los envíe, los moveré al final del grupo ``aceptado''. |
244 ``accepted'' group. If he requests that I modify any, I'll move | 248 Si él solicita que modificaciones en alguno de ellos, los moveré al |
245 them to the beginning of the ``rework'' group. | 249 principio del grupo ``revisar''. |
246 \item The ``in progress'' group. Patches that are actively being | 250 \item El grupo ``en proceso''. Parches que están siendo activamente |
247 developed, and should not be submitted anywhere yet. | 251 desarrollados, y no deberían ser enviados a ninguna parte aún. |
248 \item The ``backport'' group. Patches that adapt the source tree to | 252 \item El grupo ``backport''. Parches que adaptan el árbol de fuentes a |
249 older versions of the kernel tree. | 253 versiones antiguas del árbol del kernel. |
250 \item The ``do not ship'' group. Patches that for some reason should | 254 \item El grupo ``no enviar''. Parches que por alguna razón nunca deben |
251 never be submitted upstream. For example, one such patch might | 255 ser enviados al mantenedor oficial del kernel. Por ejemplo, alguno |
252 change embedded driver identification strings to make it easier to | 256 de esos parches podría cambiar las cadenas de identificación |
253 distinguish, in the field, between an out-of-tree version of the | 257 embebidas del controlador para hacer más fácil la distinción, en |
254 driver and a version shipped by a distribution vendor. | 258 pruebas de campo, entre una versión del controlador de |
259 salida-del-árbol y una versión entregada por un vendedor de alguna | |
260 distribución. | |
255 \end{itemize} | 261 \end{itemize} |
256 | 262 |
257 Now to return to the reasons for ordering groups of patches in this | 263 Ahora volvemos a las razones para ordenar los grupos de parches en |
258 way. We would like the lowest patches in the stack to be as stable as | 264 esta manera. Quisiéramos que los parches del fondo de la pila sean tan |
259 possible, so that we will not need to rework higher patches due to | 265 estables como sea posible, para no tener que revisar parches más |
260 changes in context. Putting patches that will never be changed first | 266 arriba debido a cambios de contexto. Poner los parches que nunca |
261 in the \sfilename{series} file serves this purpose. | 267 cambiarán en el primer lugar del fichero \sfilename{series} sirve a |
262 | 268 este propósito. |
263 We would also like the patches that we know we'll need to modify to be | 269 |
264 applied on top of a source tree that resembles the upstream tree as | 270 También desearíamos que los parches que sabemos que debemos modificar |
265 closely as possible. This is why we keep accepted patches around for | 271 sean aplicados sobre un árbol de fuentes que se parezca al oficial |
266 a while. | 272 tanto como sea posible. Es por esto que mantenemos los parches |
267 | 273 aceptados disponibles por una buena cantidad de tiempo. |
268 The ``backport'' and ``do not ship'' patches float at the end of the | 274 |
269 \sfilename{series} file. The backport patches must be applied on top | 275 Los parches ``backport'' y ``no enviar'' flotan al final del fichero |
270 of all other patches, and the ``do not ship'' patches might as well | 276 \sfilename{series}. Los parches de backport deben ser aplicados encima |
271 stay out of harm's way. | 277 de todos los otros parches, y los parches ``no enviar'' pueden |
278 perfectamente quedarse fuera del camino. | |
272 | 279 |
273 \section{Maintaining the patch series} | 280 \section{Maintaining the patch series} |
274 | 281 |
275 In my work, I use a number of guards to control which patches are to | 282 In my work, I use a number of guards to control which patches are to |
276 be applied. | 283 be applied. |
291 \item A backport patch may have several guards, one for each version | 298 \item A backport patch may have several guards, one for each version |
292 of the kernel to which it applies. For example, a patch that | 299 of the kernel to which it applies. For example, a patch that |
293 backports a piece of code to~2.6.9 will have a~\texttt{2.6.9} guard. | 300 backports a piece of code to~2.6.9 will have a~\texttt{2.6.9} guard. |
294 \end{itemize} | 301 \end{itemize} |
295 This variety of guards gives me considerable flexibility in | 302 This variety of guards gives me considerable flexibility in |
296 qdetermining what kind of source tree I want to end up with. For most | 303 determining what kind of source tree I want to end up with. For most |
297 situations, the selection of appropriate guards is automated during | 304 situations, the selection of appropriate guards is automated during |
298 the build process, but I can manually tune the guards to use for less | 305 the build process, but I can manually tune the guards to use for less |
299 common circumstances. | 306 common circumstances. |
300 | 307 |
301 \subsection{The art of writing backport patches} | 308 \subsection{The art of writing backport patches} |