aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-11-07update_layer: fix regressions in missing layer detectionPaul Eggleton
If a layer is removed by its subdirectory being deleted then we want to pick up on that and produce an appropriate error message - so let the layer_update code do the checking out and verifying things are correct before trying to parse layer.conf. This also fixes --nocheckout still checking out a branch. Additionally, drop some code that gets the layerbranch which we just retrieved a few lines above. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-11-07update.py: fix regression handling layers that failed to fetchPaul Eggleton
If the layer failed to fetch, we shouldn't be attempting to update its contents. (This got broken when we split the update script into two in c64e4c57a9158c8ae5e49f526c3ff87950d3a94e). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-10-26recipedetail: don't show homepage as link if not URLPaul Eggleton
Sometimes people put values that aren't URLs into the HOMEPAGE variable. If that's the case, then we should not turn that value into a link which will be invalid. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-10-26about: update contributors listPaul Eggleton
Ensure recent contributions from Mark and Liam are reflected in the authors list. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-10-25editlayer: allow selecting web interface typePaul Eggleton
For some repo URLs we can automatically determine the values of all of the other fields - e.g. for github or git.openembedded.org, and we've been doing that for a while. However if someone submits a URL for some other site we don't know what type of interface it uses, and usually the submitter leaves the fields blank so it falls to the layer index maintainer to set the values, and then you have to remember what the correct URL format is which is awkward especially for gitweb. In order to fix this, add a select field to the form which allows specifying which type of interface is being used. At the moment only cgit, gitweb, gitlab and "(custom)" (i.e. the current behaviour) are supported. This is not a real field but activates javascript code that sets the other fields and enables/disables the controls. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-10-19views: ensure exact matches on name are shown first in recipe searchPaul Eggleton
Improves slightly on 3155206e54413f72df3b3b41280eafd332a58ba4 by doing an exact match on name and showing that first - now when you search for "git" you really do get the git recipe first in the list. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-10-19views: ensure we only show results once in recipe searchPaul Eggleton
Usage of itertools.chain() that was introduced in 3155206e54413f72df3b3b41280eafd332a58ba4 in order to prioritise matches in the recipe name resulted in recipes showing up twice in the results if they matched in both the name and the recipe name. Use a custom chaining function that skips duplicate results in order to fix this. Fixes [YOCTO #10177]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-10-18README: update setup instructionsPaul Eggleton
With Django 1.8 you don't need to use syncdb since migrate does all of the database structure setup (and in fact in 1.9 it has been removed - we don't support that version yet but it's good to avoid that issue in future). The only other thing that syncdb did was to create a superuser, and there is now a specific command to do that. Since you do need to actually log in as part of some of the later steps, we now tell the user explicitly to run that in the first step. Additionally, add a section about what to do when upgrading - normally this is straightforward, but if you're upgrading from prior to the Django 1.8 move then you need to fake the initial migration or it'll fail (since the structure is already present). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-10-18layerindex/update_layer.py: Preserve the recipedependency filesMark Hatle
In order to keep primary keys from constantly changing, preserve the existing keys as much as possible. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com>
2016-10-18recipeparse: remove unnecessary else statementLiam R. Howlett
Code clean up. Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com>
2016-10-18layerindexer: Add layer recommends supportLiam R. Howlett
Parse layer.conf and add dependencies that are not required from LAYERRECOMMENDS_<name>. Update the layerindex/template to support recommends. Uses bitbake parsing code & checks versions. Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com> Added associated migration. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2016-10-18layerindex: Add collection and version to layerbranchLiam R. Howlett
Collection and version will be pulled from the layer.conf if it exists and dependencies will be resolved by first checking for layers with the dependency name and then checking for collections. Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com> Added associated migration. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2016-10-18layerindex: Detect dependencies from layer.conf filesLiam R. Howlett
Read dependencies from layer.conf and try to create the LayerDependency entry by looking up the correct database object. Dependencies are found by layer name only - no collection support. layer.conf parsing is handled by the bitbake code. Once all layers are added, the dependencies have to be rechecked in case the layers are not added in order. Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com>
2016-10-18layerindex/recipeparse.py: refactor setup_tinfoil, checkout_layer_branch, ↵Liam R. Howlett
parse_layer_conf to utils.py Move functions to utils to be used by other classes. Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com>
2016-10-18layerindex/tools/import_project: Add import_projectLiam R. Howlett
import_project will scan through a project and find any layer and add it to the database by calling import_layer on each layer. This differs from import_layer as it tires to figure out the remote url and uses the subdirectory (if one exists) as the name. Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com>
2016-10-18layerindex: Add distro to web interface and modelLiam R. Howlett
Add the distros to the index. This looks a lot like the machines and allows users to search for a particular distro. Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com> Added associated migration. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2016-10-18layerindex/utils: Update runcmd to decode binary strings to stringsLiam R. Howlett
Convert binary strings to strings and strip leading/trailing whitespace prior to returning errors and output. Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com>
2016-10-18layerindex/tools/import_layer.py: Avoid failing if there is any layer to addLiam R. Howlett
Subdirectories are scanned when adding layers. If any of the subdirectories or root directory layers already exist in the database, then the addition fails. This changes that behaviour to report the failure as a warning and remove it from the list. That way, if a repo has a new layer added it can be rescanned without issue. Layers being rescanned are checked against the vcs_url to ensure there is not a name collision. A name collision without the same vcs_url will still produce a hard failure. Note that multiple layers with the same vcs_url are supported in the error reporting even though this should never happen. Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com>
2016-10-18layerindex/tools/import_layer.py: Sanitize layer nameLiam R. Howlett
Django will produce a cryptic error message if layers are added with invalid names. Sanitize the layer names when trying to add them. Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com>
2016-10-18import_layer: Add --actual-branch optionLiam R. Howlett
Allow users to set actual-branch from the command line import of layers. Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com>
2016-10-18layerindex/migrations: Add initial migrationMark Hatle
We need to create an initial migration before we create any more migrations that change the database structure, which we're about to do. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Replaced fixture with a function in the initial migration so that we continue to get a master branch record created with Django 1.8. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-20Fixes for django-registration 2.xPaul Eggleton
* Newer django-registration doesn't need the workaround URLs * We need to rename password_reset_email.html to .txt Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-20update.py: default to python3 without a defined environmentPaul Eggleton
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-20Fix import script for Django 1.8 & Python 3Paul Eggleton
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-20Update to Django 1.8Paul Eggleton
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-20Drop south migrationsPaul Eggleton
These cannot be used with Django 1.8 and thus we need to remove them. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-20Fix for changes to auth views in Django 1.6Paul Eggleton
Part of this change is temporary for django-registration 1.0; later versions probably won't require the workaround URLs. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-08-31update_layer.py: fix up for bitbake API changePaul Eggleton
The multiconfig changes broke the calls here to loadDataFull(). To avoid this being an issue in future, make use of tinfoil's new parse_recipe_file() function (if available) to isolate the code here from any future changes to bitbake's internal code. Part of the fix for [YOCTO #10192]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-08-01Fix output decoding/reporting for bulk change patch downloadPaul Eggleton
With Python 3 we need to take care of decoding the output so we can treat it as a string. At the same time, it's more useful to see the output string rather than the exception if there is some output. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-08-01Use python3 commands in READMEPaul Eggleton
If you're in a virtualenv it doesn't make a difference, but outside of one it will. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-07-04Use functools.reduce instead of reducePaul Eggleton
This is apparently required in Python 3.3+, although I have been unable to verify this locally. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-07-01Fix not null error on database migrationPaul Eggleton
The updated field on the branch table was not null and this breaks the fixture. It's too painful to specify a value for a datetime field in a fixture json file and it wouldn't even make sense to specify a value in this case anyway, so just allow the field to be null. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12Explicitly specify temporary redirectionPaul Eggleton
Django 1.8 warns that the default for the "permanent" parameter to RedirectView is changing in 1.9 from True to False, but I believe we should be specifying False for these redirections - these are not just redirections from old URLs and may in fact change in the future if the site structure changes. Part of the implementation for [YOCTO #9620]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12update_layer.py: use new-style transaction APIPaul Eggleton
The old transaction API has been removed in Django 1.8 and was deprecated at 1.6. There's no explicit open transaction, commit or rollback now - we just wrap the layer operations in "with transaction.atomic()"; if we need to roll back we just raise a "dummy" exception. Part of the implementation for [YOCTO #9620]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12Preemptive auto_now fix for Django 1.8Paul Eggleton
Django 1.8 does not allow DateFields that have both auto_now and default set - since they are mutually exclusive; if you have auto_now you don't need a default. Part of the implementation for [YOCTO #9620]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12Handle Python 2 and Python 3 branches in the same indexPaul Eggleton
Add a model to support setting a python command and virtualenv per branch, which allows you to parse master with python3 and krogoth with python2 for example. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12update_layer.py: fix handling of renames with newer GitPythonPaul Eggleton
Newer versions of GitPython implement rename detection, which means that such changes don't show up as adds and deletes anymore and you get a bunch of ENOENT errors for renamed files. Add some code to explicitly look for renames and process them appropriately. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12update_layer.py: rename confusing loop variablesPaul Eggleton
Stop using "d" (sometimes multiple levels!) and use proper descriptive variable names instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12Support (and require) Python 3Paul Eggleton
We need to be able to support Python 3 so that we can parse master of OE-Core with bitbake (which now requires it). This now means the interface itself and the update script require Python 3.4+. Part of the implementation for [YOCTO #9704]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12Fix for changes in modern django-reversionPaul Eggleton
We have to upgrade django-reversion to 1.8 due to upgrading Django, but unfortunately in that same version the author has removed the type field on Version model, without a particularly good explanation as to why. This is really annoying as we were using it to provide a reasonable audit including for deletes. I suspect we'll need to move away from django-reversion and do our own thing in future, but for now at least allow the layer index to keep working. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12Upgrade to Django 1.6+Paul Eggleton
I'd like to be upgrading to 1.8 but that causes problems with South, and we're not quite ready to dispense with our existing migrations yet. Part of the implementation for [YOCTO #9620]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12bulkchange: drop temp paths in multi-patch tarballPaul Eggleton
We were getting temporary paths appearing in the tarball that gets created to allow you to download the patches for a bulk change operation that crosses multiple layers - we don't need those. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12Increase size of Recipe provides and license fieldsPaul Eggleton
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-12Fix listing *_git.bbappend as appends for git recipePaul Eggleton
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-10update.py: allow updating all branches with one commandPaul Eggleton
Allow updating multiple branches, and if no branches are specified, update all branches that have a new "updates_enabled" flag field set to True. This avoids the need to have a separate shell script which runs update.py for each branch (and thus has hardcoded knowledge of each active branch in the index, i.e. it needs to be kept up-to-date in addition to the database.) The migration will default updates_enabled to True for all branches so if you wish to take advantage of this functionality, the flag will need to be set to False for any branches that shouldn't be updated. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-05-30update.py: refactor into two separate scriptsPaul Eggleton
In order to try to avoid problems with leaking memory, context bleeding from one layer to another, and lay the groundwork for supporting updating all branches in one operation, split the updating of a single layer out to its own internal script. This means that the tinfoil instantiation and metadata parsing is in a completely separate process per layer. Implements [YOCTO #9647]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-05-30Allow blanking out field values in bulk changePaul Eggleton
If you're moving a short description value from DESCRIPTION to SUMMARY then part of that is setting DESCRIPTION to blank, however that wasn't possible - the code was assuming that a null value meant "keep the original value". Change the logic so that the value in the bulk change object is always set and is compared to the original value to see if it is different. This provides less safety against bulk change data going stale in the face of the metadata being updated, but without using an additional "magic" field value that's the price we have to pay, and it's unlikely to bother too many people I would imagine. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-05-30TODO: drop some completed itemsPaul Eggleton
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-24Display recipe blacklist informationAlex Franco
Display blacklist information for recipes in the recipe details, as well as the recipe search page, and layer page tables. This information is pulled from the PNBLACKLIST variable. Includes a hover text containing the reason for blacklist labels. Changes to Django and Layerindex files: - models.py, update.py - migration file - templates and static content (stylesheet) [YOCTO #7855] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-05-23search: show matches against pn at top of recipe search resultsElliot Smith
Using the search box creates a query against the pns, summaries, descriptions and filenames of recipes. This results in a lot of spurious results for common terms like "git" when performing a recipe search. Make the results more useful by: * Only searching against pn, description and summary (not file). * Putting matches against pn at the top of the list, followed by matches against description and summary. [YOCTO #9159] Signed-off-by: Elliot Smith <elliot.smith@intel.com>