On Wed, Jun 20, 2012 at 12:06:46PM +0200, Vincent Untz wrote: > Hi, > > In devstack, we currently have two separate lists of packages to > install: one for Ubuntu (in files/apts/) and one for Fedora (in > files/rpms/). > > This has two issues: > > - this leads to incomplete updates for dependencies. It happens that > someone updates the apts files but not the rpms ones. (shameless > plug: https://review.openstack.org/#/c/8475/ needs some review love) > > - this just doesn't scale when adding support for another distro, > especially as rpm-based distros don't all share the same package > names (hence files/rpms/ cannot really be shared). > > I'd like us to move to a new scheme where we have one list of packages > (say the Ubuntu one, for instance) and instead of adding another one > Fedora, openSUSE, etc., we have translation tables to map package names > from Ubuntu to other distros. > > Supporting a new distro is then a matter of adding a translation table > (+ hacking the code to change the right config files, obviously), and we > can easily add tests to make sure the translation tables contain a > mapping for each package (and therefore fix the first issue). > > I already have some working code for that, but I want to check if people > are fine with the idea before submitting it for review.
I've nothing against your proposal & certainly the motivation is good, but thought I'd throw out an alternative idea just in case Instead of having one sub-dir per package/distro, just have a single (CSV/JSON/XML/whatever) file listing all distros in the same place eg a CSV file where the first column is the generic name, and other columns are the distro-specific names (if required). The distro specific column would be empty if the generic name applied without change, or '-' if the package was not applicable to the distro at all. # cat nova.csv Package,Ubuntu,Fedora,RHEL,SUSE python-devel,,,,,, libvirt,libvirt-bin,,,,, dnsmasq-base,,-,-,, dnsmasq-utils,,,,,,, Hmm, using JSON would actually be a bit more readable. The core idea is to have all the data, both the master list and distro mappings in one clear place. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| _______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp