Parse layer.conf files so that BBPATH is set correctly as well as any
other custom variables. This required the repository fetching to be
split out of the update process and done first so that we're sure we
have the data for the other layers.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Formsets allow us to have separate fields for name/email for each
maintainer, as well as being able to collect the responsibility field
value. Also split the form to be output field-by-field to allow styling.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Look for conf/machine/*.conf and add a record for each file found. These
are displayed in the layer detail page if any are present.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Set BBPATH so that files from the layer can be found when recipes use
include/require pointing to files with a specific path, or use
inherit to inherit a class in the layer.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
meta-ti has a recipe in it that causes parsing to fail with a fatal
error due to LICENSE not being set; for the purposes of the layer index
just set a default value for LICENSE so that this doesn't break parsing.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
If the repo URL matches known public hosting sites (i.e.
git.openembedded.org, git.yoctoproject.org, github.com, gitorious.org,
bitbucket.org) then we can set the web URLs automatically and save the
submitter from having to figure them out themselves.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Some git web interfaces use different paths for files (blobs) and
directories when it comes to browsing; this means we need to have a
separate field for the base URL for files.
Additionally, Gitweb typically puts the path within the URL instead of
at the end (although the parameters can be reordered) and cannot handle
the file parameter (f=) being specified with no value. So, to add some
flexibility, add the ability to use a positional macro %path% to
optionally specify where to put the path. If needed, square brackets
can be used in conjunction with %path% to exclude parts of the string
when there is no path, i.e. we want to browse the root. For example, the
following base URL:
http://git.example.com/?p=somerepo.git;a=tree;[;f=%path%];hb=HEAD
would be translated to this with a path of "path/to/dir":
http://git.example.com/?p=somerepo.git;a=tree;f=path/to/dir;hb=HEAD
and this if no path were specified:
http://git.example.com/?p=somerepo.git;a=tree;hb=HEAD
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
We want to force selection of a specific layer type, otherwise many
submitters will just leave it at the default value.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
These can be used to show important notes (e.g. "This layer is
deprecated, use layer xyz instead.") as eye-catching alerts at the top
of the detail page.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Changed to full screen layout to improve the table display
and get rid of the accordion for the layer information.
Signed-off-by: Belen Barros <belen.barros.pena@intel.com>
This should be set when the application is deployed, not set to some
default value out of the box.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
The layer list has a javascript-based search which won't interact well
with server-based pagination, so disable it for the moment.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Use a Django snippet to make pagination display a bit nicer (compressed
form instead of showing all page numbers). In order to interact properly
with GET requests, an additional snippet was required to add parameters
to the URL (why doesn't Django provide this out of the box?).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* Use more traditional GET instead of POST method
* Search in pn, summary, description and filename instead of just pn
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* Set custom title for admin pages
* Use reasonable field widths on editing pages
* Allow filtering and searching by useful fields
* Disable editing of recipe records
* Disable editing of layer fields set by the update script
* Show "Layers" instead of "Layer items" for layers
* Show "Layer dependencies" instead of "Layer dependencys"
* Show layer name in maintainers listing
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
By default, if DESCRIPTION is not set it takes the value of SUMMARY.
However, within this tool it is useful for us to be able to tell when
DESCRIPTION has not been set so we want it to be blank if that is the
case.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
The default value of HOMEPAGE ('unknown', set from bitbake.conf) is not
particularly helpful - we want it to be blank if it's not set, so just
set it to blank before parsing each recipe.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
If recipe parsing failed the pn field will be blank, but for display
purposes we can take a guess from the filename.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Just in case two users go to publish the same layer at around the same
time, avoid saving the record for a user who tries to publishes it after
the first time.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Collect history for changes, and allow browsing / reverting / comparison
within the admin interface.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>