Commit Graph

83 Commits

Author SHA1 Message Date
Paul Eggleton
9af1144928 Collect bbappends and bbclasses for each layer
Collect bbappend/bbclass info during the update process and display it
on the layer detail page.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-06-17 21:11:53 +01:00
Paul Eggleton
38e8791c21 Collect BUGTRACKER, PROVIDES and BBCLASSEXTEND for each recipe
* Show BUGTRACKER in the recipe detail page if set
* Track the other two variables for possible future use

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-06-03 10:59:10 +01:00
Paul Eggleton
e72a33e16a Add preference order field
Add an index_preference field to enable control over which layer's
duplicate recipes get de-emphasised in the recipe search results.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-06-03 10:59:10 +01:00
Paul Eggleton
9df79fe0ef Sort recipes by PN and descending PV in layer list
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-07 12:13:14 +01:00
Paul Eggleton
b3a8b19eb4 models: add layer name to string representation of layer note
This includes the layer name in layer note additions/changes in the
history page, among other places.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-04-02 12:25:26 +01:00
Paul Eggleton
979fb7980d Fix "AnonymousUser has no attribute 'email'" errors when not logged in
We shouldn't be looking for this attribute unless the user has logged in
- this was a regression in the recent email case fix.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-28 21:39:00 +00:00
Paul Eggleton
665e40e2c5 Ensure user_can_edit email address check ignores case and spaces
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-28 12:10:28 +00:00
Paul Eggleton
333ee2a94e Improved fix for ../ in usage URL
This actually works for complex URLs since we normalise just the path
portion that we are adding instead of trying it on the URL after
composing it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-27 16:17:49 +00:00
Paul Eggleton
2804211f8f Fix web subdirectory links with gitweb
gitweb, ever vigilant for the slightest transgression in URL syntax,
fails to find the specified path if it is a directory and has a trailing
slash, so we need to avoid adding this.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-27 16:02:28 +00:00
Paul Eggleton
cd7e00bf57 Allow ../ in usage URL field
Allow using e.g. ../README to point to README file in the parent of the
repository subdirectory.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-27 16:01:24 +00:00
Paul Eggleton
a7323361ff Bump up some of the field lengths
Avoid truncation for slightly longer fields (as happened with PN and
SUMMARY when importing some existing layers).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-27 09:34:56 +00:00
Paul Eggleton
f17c5cf04f Move fetch dir calculation to model
This makes it easier to get this directory name outside of the update
script.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 15:41:58 +00:00
Paul Eggleton
0a1215e59e Move repo subdirectory to layerbranch
So it turns out that one or two layers have changed in structure between
branches, so we need to be able to specify this on a per-branch basis.
Good times...

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 15:41:58 +00:00
Paul Eggleton
af499c0d99 Add sort priority field to branch model
This enables sorting the branch drop-down in a configurable manner (e.g.
so that you can have them in order from newest to oldest).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 22:56:31 +00:00
Paul Eggleton
4be747582f Add a short description for branches to show in drop-down
Allows you to add e.g. "old stable" next to the denzil branch for
clarification.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 18:31:02 +00:00
Paul Eggleton
3f967cf751 Allow usage URL to point to a file within the repository
This means the usage URL can point to a file whose contents may be
different per branch (e.g. a README file).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-05 20:37:49 +00:00
Paul Eggleton
354e368aa2 Add support for handling multiple branches
Change the data structure to support multiple branches. At the top level
there is a set list of Branch objects, and then a LayerBranch object
between each layer and the maintainers, dependencies, recipes and
machines, so that the set of each can be different per branch. The
branch is a session option, and can be selected via a drop-down that is
shown for all pages.

Additionally, with this change we avoid the need to run the update
script within a build environment set up with oe-init-build-env - since
we need a specific version of BitBake per branch we now use our own copy
of BitBake which is fetched by the script itself. The update script will
need to be called multiple times however - once per branch.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-05 20:37:48 +00:00
Paul Eggleton
26ab9dbb28 Add ability to add, edit and delete layer notes
This allows adding an important notice to a layer e.g. "this layer is
deprecated, please use layer xyz instead". Only one layer note can be
added through the interface although the data structures allow multiple,
so notes may be added programmatically without disturbing user-added
ones.

With this change we also add a get_absolute_url() function to the
LayerItem model and change the calls to reverse() for layers to use it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 14:36:41 +00:00
Paul Eggleton
3f60b3fba3 Improve detail page for unpublished layers
* Add a label making it clear the layer is unpublished
* Hide recipes list header since there should never be any recipes (as
  the update script doesn't process unpublished layers)
* Add test links for base URLs

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-27 12:10:49 +00:00
Paul Eggleton
c40bfedd4a Implement editing of layers
Allow users with publish permission to edit any layer, and users with
the same email address as one of the maintainers of a layer to edit that
layer.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-27 10:34:02 +00:00
Paul Eggleton
431f2fba17 Add javascript code to split name/email pairs in maintainer fields
In the submit layer form, if a user pastes/types in a name/email pair
(e.g. My Name <my.email@example.com>) then this will automatically be
split into the name and email input fields, saving the user from doing
this by hand (since this is a common notation within repositories and
documentation.)

Additionally, if there is any text after the email address then move it
into the responsibility field unless the responsibility has been entered
by the user.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26 15:35:41 +00:00
Paul Eggleton
4756fed86f Drop created_date field from LayerItem
We have django-reversion to handle auditing/history now so we don't need
an explicit field to hold the creation date.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26 14:59:26 +00:00
Paul Eggleton
e0f8a05423 Handle updating of inc files/classes within same layer
If we aren't doing a full refresh, when changes to an included/required
file or an inherited class occur we need to update all of the files that
depend on them. BitBake records these dependencies, so read them and
record them against each recipe.

At the moment this only handles dependencies within the same layer; that
is probably sufficient to handle most changes for the purposes of
extracting the data this application cares about. A future improved
solution will probably involve making use of BitBake's cache rather than
and parsing all layers and their dependencies rather than individual
recipes.

This change also adds -x/--nofetch and -n/--dry-run options for
debugging as well as some further debug messages.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26 11:05:43 +00:00
Paul Eggleton
d8c6824f30 Add help text to model fields
Add some explanatory help text which can be used in the submission form.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-25 10:13:05 +00:00
Paul Eggleton
e4eb8213cf Collect machine information from layers
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>
2013-02-24 23:14:53 +00:00
Paul Eggleton
355c92cfe7 Add mailing list field to layer
Enable recording the mailing list associated with each layer, if any.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-23 23:48:06 +00:00
Paul Eggleton
8b742732d8 Clarify BSP layer type description
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-23 22:48:49 +00:00
Paul Eggleton
6cd47bdd82 Handle web interfaces with different URL schemes
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>
2013-02-23 20:33:24 +00:00
Paul Eggleton
4fef5c0c8e Don't default layer type in submit layer form
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>
2013-02-23 16:44:59 +00:00
Paul Eggleton
05ceb17487 Admin interface improvements
* 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>
2013-02-19 12:02:04 +00:00
Paul Eggleton
dc4494aa8a Return blank URL for recipe file if layer's web tree base URL is not set
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-18 16:00:43 +00:00
Paul Eggleton
22b7918bf2 Allow a name to be shown even if parsing recipe failed
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>
2013-02-18 15:40:09 +00:00
Paul Eggleton
2eb5f38b21 Initial commit of layerindex-web
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-13 12:09:57 +00:00