← Back to team overview

checkbox-dev team mailing list archive

Improve customizability of provider directory layout

 

This patch set makes providers more customizable wrt where the data they care
about is laid out on the filesystem.

This allows us to:
- ship executable files in in /usr/lib/$provider/
- ship data files in /usr/share/$provider/data
- ship jobs files in /usr/share/$provider/jobs
- ship whitelists files in /usr/share/$provider/whitelists
- ship translations in /usr/share/locale/LC_MESSAGES/$language/$provider.mo

Jobs and whitelists are not customizable but we can now point the base location
at /usr/share/$provider and take advantage of implicit values for jobs_dir and
whitelists_dir

Locale data is actually a bit special as we can just point it to
/usr/share/locale and the rest will be done by gettext. By having this property
we can build local translation files and use it in practice when we use
`manage.py develop` on a provider.

Tell me if you think I should add more tests or if I should make jobs/whitelits
explicit (and perhaps remove all the implicitness from Provider1 entirely,
moving all of the defaults to Provider1Definition.

This is also tracked as:
https://code.launchpad.net/~zkrynicki/checkbox/better-provider/+merge/208865



Follow ups