Commit Graph

62 Commits

Author SHA1 Message Date
Paul Eggleton
6f85a1b458 TODO: add some more tasks
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-11-21 02:51:30 +13:00
Paul Eggleton
403e94a0f1 Add search to duplicates/comparison layer filter dialog
The layer index has quite a number of layers in it these days and thus
this list is quite long to scroll through. Use the same layer filtering
method as we do on the layers page, taking care to ensure that the
"select all" and "select none" buttons only affect what you can see when
the layer list is filtered.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-19 16:44:42 +13:00
Paul Eggleton
c26604146a recipeparse: fix bitbake-cookerdaemon.log being written out to meta/
Our setup when parsing recipes is a little unusual in that we have no
bblayers.conf, thus findTopdir() which is used to find where to put
bitbake.lock (and bitbake-cookerdaemon.log as of the recent bitbake
commit 1620dbc48ffb2a882371cf9174a7b12648befc8a) defaults to the
parent's parent of where bitbake.conf can be found, which is the meta/
subdirectory of the OE-Core repo, thus that's where we now find
bitbake-cookerdaemon.log gets written out. We really don't want to be
writing anything into the metadata repositories so create a fake
conf/bblayers.conf in our temp directory to make findTipdir() pick that
instead.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-09-26 17:23:24 +12:00
Paul Eggleton
5edeb03cb1 TODO: remove completed item
Publishing notification emails got enabled in
be95164aa7.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-09-20 16:04:49 +12:00
Paul Eggleton
ac32edb5bd TODO: add some more items
There's always more work to do...

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-09-06 11:08:43 +12:00
Paul Eggleton
f259f0c36f Limit selection of "Base" layer type
If a user doesn't have publish rights and the type of the layer isn't
already "Base" then disallow selecting the Base layer type. Some
submitters are selecting this type for their own layers, but it's pretty
much reserved for openembedded-core and meta-oe (so that they appear at
the top of the layer list).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-09-06 11:08:43 +12:00
Paul Eggleton
7954acad9f Disable git interactive password prompts
We do not want to be prompting the user for a password during layer
updates or upstream checks, e.g. in the case where a repo requires
authentication, or on github where any fetch of a nonexistent repo
apparently triggers authentication.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-09-06 11:08:43 +12:00
Paul Eggleton
8067208d2d update: do not try to parse a layer that failed to fetch
If a layer's repository didn't fetch properly then we should not be
trying to parse it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-09-06 11:08:43 +12:00
Paul Eggleton
db08df4a86 Improve collection/display of LayerUpdate records
Make layerupdate collection slightly more reliable and make it easier
to see when updates have actually been captured:

* Split layerbranch into separate layer and branch fields, since there
  may not be a layerbranch in existence but we might want to log an
  error relating to the branch and layer.
* Show all layerupdates on the update detail page, not just those with
  log messages
* Record before and after revisions and show these in the update detail
  and layerupdate detail (with links)
* Record return code of update_layer process
* Highlight layer updates with a non-zero return code, errors or
  warnings in the output on the update detail page
* Show duration on the layerupdate detail page

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-08-14 15:07:34 +02:00
Paul Eggleton
99c7f0b916 rrs: show link to other distro comparison pages
If other distro comparison package(s) exist for a recipe being shown in
the RRS recipe detail page, link to the page for each package as well as
any extra URLs.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-08-13 16:02:59 +02:00
Paul Eggleton
fca74f3ac3 Update TODO list
* Add a few items
* Merge the top feature lines with the bottom ones
* Drop an item that has basically been satisfied by way of the REST API

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-08-06 12:36:31 +02:00
Paul Eggleton
7effcc8cfb update_layer: avoid errors on modified & renamed files
If a file is modified and renamed it will show up in both
iter_change_type('M') and iter_change_type('R'), however naturally the
file that will exist will be the b path and not the a one, so we should
be looking at the b path or we will get errors.

FYI you can reproduce this with OE-Core (in a scratch database) using
the following procedure:
1) (in the OE-Core layer directory):
   git checkout 59285b324f6d9ed270b0bef209ef5da22a620a83
2) update.py -l openembedded-core -b master -x --nofetch -r --fullreload
3) (in the OE-Core layer directory):
   git checkout 086308aa2a5e332de6f00ed397c4a55d132f158f
4) update.py -l openembedded-core -b master -x --nofetch

Without this change you'll see the following error:

ERROR: Unable to read /opt/layerindex/layers/git___git_openembedded_org_openembedded-core/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb: Traceback (most recent call last):
  File "/opt/layerindex/layers/bitbake/lib/bb/command.py", line 84, in runCommand
    result = command_method(self, commandline)
  File "/opt/layerindex/layers/bitbake/lib/bb/command.py", line 568, in parseRecipeFile
    envdata = bb.cache.parse_recipe(config_data, fn, appendfiles)['']
  File "/opt/layerindex/layers/bitbake/lib/bb/cache.py", line 315, in parse_recipe
    bb_data = bb.parse.handle(bbfile, bb_data)
  File "/opt/layerindex/layers/bitbake/lib/bb/parse/__init__.py", line 117, in handle
    return h['handle'](fn, data, include)
  File "/opt/layerindex/layers/bitbake/lib/bb/parse/parse_py/BBHandler.py", line 132, in handle
    abs_fn = resolve_file(fn, d)
  File "/opt/layerindex/layers/bitbake/lib/bb/parse/__init__.py", line 141, in resolve_file
    raise IOError(errno.ENOENT, "file %s not found" % fn)
FileNotFoundError: [Errno 2] file /opt/layerindex/layers/git___git_openembedded_org_openembedded-core/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb not found

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-07-09 13:50:15 +02:00
Paul Eggleton
fd0079d5c9 TODO: add RRS items
Add some stuff still left to be done after the merging.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Amanda Brindle
78c2561181 templates/layerindex/classes.html: Add bbclass search
Add another tab to search for classes.

Fixes [YOCTO #11207]

Signed-off by: Amanda Brindle <amanda.r.brindle@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-07 16:54:46 +13:00
Diana Thayer
2e671480c7 Asynchronous email notifications, task execution
This patch adds asynchronous task execution using a Celery backend
and RabbitMQ task queue, so that the layer submission process to
proceed even in the event that sending the notification email fails,
and establishing an asynchronous execution mechanism that we can use
in the future e.g. for triggering parse operations from the web UI.
This pertains to bug 11197:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=11197

It updates the README to reflect the installation and configuration
of a basic RabbitMQ setup, adds a 'tasks.py' file to contain task
definitions, updates the 'edit_layer_view' function to send
emails to administrators about new and updated layers asynchronously,
modifies the 'settings.py' to include a default configuration
for a RabbitMQ connection, and updates the Dockerfile to start a Celery
worker alongside the Gunicorn daemon.

Fixes [YOCTO #11197].

Signed-off-by: Diana Thayer <garbados@gmail.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-09-01 16:59:43 +12:00
Paul Eggleton
8dfe44ed5e TODO: drop implemented items
Drop a couple of items that got implemented recently.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-03-22 14:21:22 +13:00
Paul Eggleton
cb656bdd31 Sort higher preference layers first in layer list
On the main layer index page we want openembedded-core to appear before
meta-oe - naturally openembedded-core is the layer everyone starts from.
We already have an "index_preference" column that we use for search
results, so just sort by that here before sorting by name.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-01-16 14:27:06 +13:00
Paul Eggleton
43203c578c Record and display update logs
At the moment it's a bit difficult to get update logs out of the
environment in which the update script is being run. In order to make
the logs more accessible, create a LayerUpdate model to record the
output of update_layer.py separately for each layerbranch and tie the
created LayerUpdates together with a single Update model per session.

We provide two ways to look at this - a Tools->Updates page for
logged-in users, and there's also an "Updates" tab on each layer that is
accessible to anyone; which one is useful depends on whether you are
looking at the index as a whole or an individual layer.

Update records older than 30 days are deleted automatically by default.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-11-16 15:31:46 +13:00
Paul Eggleton
18d8267da3 Increase size of Recipe provides and license fields
Fix "data truncated" warnings/errors when loading data for OE-Core:
* PROVIDES for recipe packagegroup-base is ~1452 characters
* LICENSE for recipe linux-firmware is ~1053 characters

(These aren't shown with SQLite, only with something like MariaDB where
column sizes are enforced.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12 11:33:08 +12:00
Paul Eggleton
3bf78e6c37 Fix listing *_git.bbappend as appends for git recipe
Fix a greedy regex in the recipe detail view resulting in the git recipe
listing all bbappends named *_git.bbappend as its bbappends (quite a few
in the public instance).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12 11:33:08 +12:00
Paul Eggleton
b80833e1c9 TODO: drop some completed items
We took care of showing blacklist info and searching for the git recipe
recently. We've used "git fetch" rather than "git pull" for some time
now so we won't be hitting merge situations.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-05-30 15:28:20 +12:00
Paul Eggleton
cad4d3df16 Update TODO with more ideas
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-10-22 10:40:25 +01:00
Paul Eggleton
4c08b28387 recipes: preserve search keyword when switching between branches
If you want to check what the same search returns on a different branch
it makes things easier if you don't have to re-type the search after
selecting the branch.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-03-09 21:16:08 +00:00
Paul Eggleton
5ee1bb255b TODO: Add some more todo items
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-02-23 02:14:13 +00:00
Paul Eggleton
482e7c437f TODO: update todo list
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-09-20 07:03:30 +01:00
Paul Eggleton
1643aef67d Navigation improvements
* Drop the front page - this just gets in the way. Redirect to the
  layers list instead. This has meant adding a touch more text to the
  about page and adding the FAQ link to the footer.
* Use a separate navbar to hold the branch selector and the main
  top-level  pages (Layers, Recipes, Machines) instead of tabs
* All pages depending on a branch selection are now under
  branch/<branchname>/ so we don't need to have the branch selection on
  every page.
* Use breadcrumbs on recipe detail and layer detail pages instead of
  tabs
* Add title to recipe detail page

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-09-05 00:31:23 +01:00
Paul Eggleton
1c70da817b Force scrollbar to always show to prevent page width changing
Having the page content dance about when switching between pages just
because one has a scrollbar and the other doesn't is annoying, so just
force the scrollbar to show all of the time to avoid this.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:15 +01:00
Paul Eggleton
3dfca5a250 layers: leave drop-down filter box open when ticking/unticking items
This allows users to easily tick and untick several items at once
without having to drop the filter box down multiple times. Thanks to
Belen for this snippet.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:15 +01:00
Paul Eggleton
4ec2431fe3 Move layers import script to tools subdirectory
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:14 +01:00
Paul Eggleton
e36280922a update.py: preserve recipe id when updating
The recipe detail pages use the recipe record id, so in case users
bookmark links to these pages, try to preserve the id when a recipe
upgrade occurs (which usually shows up as a delete and an add). This
also works when doing a full update with -r so that we can capture the
newly recorded items (bbclasses, bbappends) without having all the
recipe id values change.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:14 +01:00
Paul Eggleton
5166582791 Add cancel button to edit layer form
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:14 +01:00
Paul Eggleton
33f433c1d2 Return to appropriate page when saving a layer
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:14 +01:00
Paul Eggleton
84709dbca6 Add recipe bulk change feature
This provides a way to set "meta" fields (SUMMARY, DESCRIPTION,
HOMEPAGE, BUGTRACKER, SECTION, and LICENSE) for a number of recipes at
once, and then download those changes in the form of one or more patch
files which can be submitted for merging into the layer.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:14 +01:00
Paul Eggleton
89f9e6afe8 Add duplicate recipes/classes page
Add page that lists recipes and classes "duplicated" across different
layers.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-06-17 21:11:58 +01:00
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
d1b875a76b Improve history collection and add link to history page
Save individual field changes into revision comment and display this
comment on the history page. Now we're ready to add a link at the
bottom of every page so the history is easily visible.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-06-03 10:59:10 +01:00
Paul Eggleton
a490f057d6 update.py: improve fetch failure handling
* Report layer which failed to fetch in error message
* Don't retry fetching a repo if it already failed for another layer
  (where more than one layer is in the same repository)
* Exit immediately if all fetches failed

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-08 22:52:09 +01:00
Paul Eggleton
714bc8e39f update.py: error out with unexpected arguments
It's easy to forget you need to use -l to specify the list of layers to
update and previously we just ignored unused arguments, so check for
them and error out if present.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-08 22:01:25 +01:00
Paul Eggleton
25f4acaa46 TODO: update todo list
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-08 11:59:09 +01:00
Paul Eggleton
2428077170 TODO: update todo list
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-28 18:43:11 +00:00
Paul Eggleton
342ff28648 De-emphasise recipes where there is a more preferred version available
If another recipe exists with the same name in a different layer and
that other layer is "older" (by layer ID) and is a software or base
layer then lighten the recipe entry in the search results as it may
not be the preferred version (e.g. recipes in BSP or distro layers may
have been customised specifically for the machine or distro).

This has had a performance impact on the recipes list; as a result
showing all recipes by default has been disabled. If the user really
wants to see all recipes they can just leave the search box blank and
hit the search button.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 17:04:56 +00:00
Paul Eggleton
d2e4f6d322 TODO: update todo list
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 20:24:43 +00:00
Paul Eggleton
46e579b6e6 Show count of layers to be reviewed next to Review link
Add a badge next to the Review link (when shown for users with the
publish permission) on all pages showing how many layers need to be
reviewed, if any.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 09:16:19 +00:00
Paul Eggleton
4b3aad2cea Add CAPTCHA to submission form
This should prevent spamming even though this is less likely with this
kind of site.

The CAPTCHA does not show when editing, only submitting, and is also not
shown for authenticated users.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 15:48:38 +00:00
Belen Barros
f178ea3151 Styles for the submit layers form
Improve styling and layout

Signed-off-by: Belen Barros <belen.barros.pena@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 14:36:41 +00:00
Paul Eggleton
9a3bfac320 Add ability to delete unpublished layers
If we get bogus or duplicate entries we'll want the ability to delete
them easily before publishing (without needing to have access to the
admin interface), so add this ability. Being able to delete a published
layer might be a bit dangerous and is less likely to be needed so that
is disallowed for now.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 14:36:41 +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
ad5e8f0524 Clarify language around publishing layers
Show "unpublished" rather than "new" in dependencies list in submit
form, and mention publishing as the operation in the "thanks for
submitting" page.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-27 23:10:28 +00:00