<br><br><div class="gmail_quote">On Wed, Jun 20, 2012 at 12:24 PM, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, Jun 20, 2012 at 12:06:46PM +0200, Vincent Untz wrote:<br>
> Hi,<br>
><br>
> In devstack, we currently have two separate lists of packages to<br>
> install: one for Ubuntu (in files/apts/) and one for Fedora (in<br>
> files/rpms/).<br>
><br>
> This has two issues:<br>
><br>
>  - this leads to incomplete updates for dependencies. It happens that<br>
>    someone updates the apts files but not the rpms ones. (shameless<br>
>    plug: <a href="https://review.openstack.org/#/c/8475/" target="_blank">https://review.openstack.org/#/c/8475/</a> needs some review love)<br>
><br>
>  - this just doesn't scale when adding support for another distro,<br>
>    especially as rpm-based distros don't all share the same package<br>
>    names (hence files/rpms/ cannot really be shared).<br>
><br>
> I'd like us to move to a new scheme where we have one list of packages<br>
> (say the Ubuntu one, for instance) and instead of adding another one<br>
> Fedora, openSUSE, etc., we have translation tables to map package names<br>
> from Ubuntu to other distros.<br>
><br>
> Supporting a new distro is then a matter of adding a translation table<br>
> (+ hacking the code to change the right config files, obviously), and we<br>
> can easily add tests to make sure the translation tables contain a<br>
> mapping for each package (and therefore fix the first issue).<br>
><br>
> I already have some working code for that, but I want to check if people<br>
> are fine with the idea before submitting it for review.<br>
<br>
</div>I've nothing against your proposal & certainly the motivation is<br>
good, but thought I'd throw out an alternative idea just in case<br>
<br>
Instead of having one sub-dir per package/distro, just have a<br>
single (CSV/JSON/XML/whatever) file listing all distros in the<br>
same place<br>
<br>
eg a CSV file where the first column is the generic name, and<br>
other columns are the distro-specific names (if required). The<br>
distro specific column would be empty if the generic name applied<br>
without change, or '-' if the package was not applicable to the<br>
distro at all.<br>
<br>
  # cat nova.csv<br>
  Package,Ubuntu,Fedora,RHEL,SUSE<br>
  python-devel,,,,,,<br>
  libvirt,libvirt-bin,,,,,<br>
  dnsmasq-base,,-,-,,<br>
  dnsmasq-utils,,,,,,,<br>
<br>
Hmm, using JSON would actually be a bit more readable.<br>
<br>
The core idea is to have all the data, both the master list and<br>
distro mappings in one clear place.<br></blockquote><div><br></div><div>We should keep in mind also that not all the packages have an equivalent in all the distros: sometimes one single package is splitted in several in other distros, or it doesn't exist at all. CSV would be not truly manageable, but having everything in one single place would be easier if any update is necessary.  JSON can be a good candidate but, in the case of nova (46 packages right now), would have to see if we don't get "spaghetti" code difficult to deal with.</div>
<div><br></div></div>-- <br><div align="left"><div><font style="font-size:14px"><span lang="ES" style="font-family:Arial">Ghe Rivero<br></span></font><font face="Arial" size="2" style="font-family:arial,helvetica,sans-serif"><font><b>OpenStack & Distribution Engineer<br>
</b></font></font><span style="border-collapse:separate;font-size:medium;font-family:Times"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"></span></span><b style="font-size:14px"><font face="Arial" size="2" style="font-family:arial,helvetica,sans-serif"><a href="http://www.stackops.com/" style="color:rgb(17,85,204)" target="_blank"><b>www.stackops.com</b></a> | </font></b><font face="Arial" size="2" style="font-size:14px;font-family:arial,helvetica,sans-serif"><font size="1"> <a href="mailto:diego.parrilla@stackops.com" style="color:rgb(17,85,204)" target="_blank">ghe.rivero@stackops.com</a></font></font><span style="border-collapse:separate;font-size:medium;font-family:Times"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><font color="#004438" face="Arial"><b><b><span lang="EN-GB" style="font-size:10pt"></span></b></b></font></span></span><font face="Arial" size="2" style="font-size:14px;font-family:arial,helvetica,sans-serif"><font size="1"> | </font></font><span style="border-collapse:separate;font-size:medium;font-family:Times"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><font face="Arial" size="2" style="font-family:arial,helvetica,sans-serif"><font size="1"><a value="+34649944329" style="color:rgb(17,85,204)">+34 625 63 45 23 </a>| <a style="color:rgb(17,85,204)">skype:ghe.rivero</a></font></font></span></span><font face="Arial" size="2" style="font-size:14px;font-family:arial,helvetica,sans-serif"><a href="http://www.stackops.com/" style="color:rgb(17,85,204)" target="_blank"><b><br>
</b></a></font></div></div><div><font color="#004438" face="Arial"><b><p><span style="border-collapse:separate;font-size:medium;font-family:Times"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><span style="border-collapse:separate;font-size:medium;font-family:Times"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><font color="#004438" face="Arial"><b><b><span lang="EN-GB" style="font-size:10pt"><img src="http://stackops.s3-external-3.amazonaws.com/STACKOPSLOGO-ICON.png"></span></b></b></font></span></span></span></span></p>
</b></font></div><div><p><font color="#000000" size="1">******************** ADVERTENCIA LEGAL ******************** <br>Le informamos, como destinatario de este mensaje, que el correo electrónico y las comunicaciones por medio de Internet no permiten asegurar ni garantizar la confidencialidad de los mensajes transmitidos, así como tampoco su integridad o su correcta recepción, por lo que STACKOPS TECHNOLOGIES S.L. no asume responsabilidad alguna por tales circunstancias. Si no consintiese en la utilización del correo electrónico o de las comunicaciones vía Internet le rogamos nos lo comunique y ponga en nuestro conocimiento de manera inmediata. Este mensaje va dirigido, de manera exclusiva, a su destinatario y contiene información confidencial y sujeta al secreto profesional, cuya divulgación no está permitida por la ley. En caso de haber recibido este mensaje por error, le rogamos que, de forma inmediata, nos lo comunique mediante correo electrónico remitido a nuestra atención y proceda a su eliminación, así como a la de cualquier documento adjunto al mismo. Asimismo, le comunicamos que la distribución, copia o utilización de este mensaje, o de cualquier documento adjunto al mismo, cualquiera que fuera su finalidad, están prohibidas por la ley. <br>
<br>***************** PRIVILEGED AND CONFIDENTIAL **************** <br>We hereby inform you, as addressee of this message, that e-mail and Internet do not guarantee the confidentiality, nor the completeness or proper reception of the messages sent and, thus, STACKOPS TECHNOLOGIES S.L. does not assume any liability for those circumstances. Should you not agree to the use of e-mail or to communications via Internet, you are kindly requested to notify us immediately. This message is intended exclusively for the person to whom it is addressed and contains privileged and confidential information protected from disclosure by law. If you are not the addressee indicated in this message, you should immediately delete it and any attachments and notify the sender by reply e-mail. In such case, you are hereby notified that any dissemination, distribution, copying or use of this message or any attachments, for any purpose, is strictly prohibited by law.</font></p>
</div><br>