aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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>
2015-11-02update.py: fix splitting on _ when getting class inheritancePaul Eggleton
The code to populate the inherits information was using a function designed to get the recipe name from a file path, but unlike recipe filenames, the underscore isn't treated as special in class filenames and in fact it's quite common to use underscores there; we were ending up with items in the inherit list such as "populate" and "rootfs". Use the standard python os.path functions to do the splitting instead and avoid this. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-10-22Update TODO with more ideasPaul Eggleton
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-10-07Docker based environment setupAlex Franco
Replicate production setup in Docker containers [YOCTO #7575] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-10-07requirements.txt: added GitPythonAlex Franco
As it is needed for layerindex anyway [YOCTO #7575] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
2015-10-07Support for recipe inherits fieldAlex Franco
To identify image recipes and provide inheritance data for recipes, an inherits field was added to the recipe model, and then populated using refactored data from __inherit_cache. Finally the field was also added to page templates, along with style changes proposed in attachment, and an additional style change to display the inherits field as a list in detailed view. The field skips globally inherited data as proposed. [YOCTO #7575] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-06-17recipeparse.py: handle old BBFILES append method in layer.confPaul Eggleton
Some layers use an older-style method to append a value to BBFILES, namely BBFILES := "${BBFILES} ..." - this normally works fine, but in our environment we don't order parsing of layers. That's probably wrong, but for now just ensure BBFILES has a value to begin with as a workaround. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-06-15update.py: minor fixup for last commitPaul Eggleton
Fix up memory leak fix for bitbake in daisy and earlier which did not have bb.codeparser.codecache. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>