Commit Graph

388 Commits

Author SHA1 Message Date
Aníbal Limón
eb13bb4ce7 layerindex/migrations: Update remaning migrations for apply at top of
RRS

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-06-22 17:00:52 -05:00
Paul Eggleton
2cf4269ed2 Explicitly specify temporary redirection
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-22 16:39:41 -05:00
Paul Eggleton
3d6dc8f35a update_layer.py: use new-style transaction API
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-22 16:39:11 -05:00
Paul Eggleton
3df2b1c5d9 Preemptive auto_now fix for Django 1.8
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-22 16:39:10 -05:00
Paul Eggleton
d4b4f40eca Handle Python 2 and Python 3 branches in the same index
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-22 16:38:50 -05:00
Paul Eggleton
72fcee545a update_layer.py: fix handling of renames with newer GitPython
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-22 16:38:50 -05:00
Paul Eggleton
cfc911a254 update_layer.py: rename confusing loop variables
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-22 16:38:50 -05:00
Paul Eggleton
fdd3a8935e Support (and require) Python 3
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+.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-22 16:38:50 -05:00
Paul Eggleton
edba6fdeeb Fix for changes in modern django-reversion
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-22 16:38:50 -05:00
Paul Eggleton
82266556cd Upgrade to Django 1.6+
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-22 16:38:45 -05:00
Paul Eggleton
fee87f4353 bulkchange: drop temp paths in multi-patch tarball
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-22 16:36:26 -05:00
Paul Eggleton
3bf44a1bfc 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-22 16:36:17 -05:00
Paul Eggleton
c1bce2795f 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-22 16:35:49 -05:00
Paul Eggleton
d0719ca951 update.py: allow updating all branches with one command
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-06-22 16:35:49 -05:00
Paul Eggleton
0d642c525a update.py: refactor into two separate scripts
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-06-22 16:35:49 -05:00
Paul Eggleton
79282350f8 Allow blanking out field values in bulk change
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-06-22 16:35:49 -05:00
Paul Eggleton
fbc6a058d3 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-06-22 16:35:49 -05:00
Alex Franco
c6d0a8292a Display recipe blacklist information
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-06-22 16:35:29 -05:00
Elliot Smith
d6a601c738 search: show matches against pn at top of recipe search results
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>
2016-06-22 16:35:06 -05:00
Paul Eggleton
f619474bc9 update.py: fix splitting on _ when getting class inheritance
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>
2016-06-22 16:35:06 -05:00
Paul Eggleton
de30c3a634 Update TODO with more ideas
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-22 16:35:06 -05:00
Alex Franco
e6233b61cd Docker based environment setup
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>
2016-06-22 16:35:06 -05:00
Alex Franco
d83844736f requirements.txt: added GitPython
As it is needed for layerindex anyway

[YOCTO #7575]

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
2016-06-22 16:35:03 -05:00
Alex Franco
512e6c53ef Support for recipe inherits field
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>
2016-06-22 16:33:52 -05:00
Aníbal Limón
6e80152140 rrs/tools/rrs_maintainer_history.py: Update to point new meta-poky repository.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-03-29 15:16:38 -06:00
Aníbal Limón
6b6526d3a1 tools/rrs_distros.py: Fix distro_check.create_distro_packages_list call
Now create_distro_packages_list requires d to be passed, this change was
done to enable proxy support into create_distro_packages_list function.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-03-28 11:34:32 -06:00
Aníbal Limón
170d1af66e rrs: Fix frontpage redirect
We was experimenting fixed redirects due to urls are
cached at init of rrs.

Move the redirect Release, Milestone selection to a view
called FrontPageRedirect.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-03-22 12:10:57 -06:00
Aníbal Limón
74c03cdccc rrs/tools/rrs_upstream_email.py: Update message to point recipe file
instead of deprecated upstream tracking file.

Since upstream_tracking.inc file is deprecated because now every recipe
has it's own upstream information then update email message according it.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-06 10:27:35 -06:00
Belen Barros Pena
88097833b4 Show the 'Upstream version' column only when relevant
Currently the recipes table always shows the 'Upstream version' column.
However, for recipes up-to-date, this column is irrelevant, since for such
recipes 'version' always equals 'upstream version'.

Since the vast majority of the recipes are up-to-date, when you are
showing all the recipes the 'upstream version' column is also pretty
useless.

The column is only really relevant when you are looking at recipes
with status 'not updated' or 'can't be updated'. I would have thought
there would be nothing to show in the 'Upstream version' column for
recipes with status 'Unknown', but it turns out some of those do have
an upstream version value, that I thought might be useful to the
maintainer somehow.

So, this patch hides the 'Upstream version' column whenever you are
looking at all the recipes or up-to-date recipes; and shows it when
you select any of the other recipe statuses

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
2015-12-08 12:25:19 -06:00
Aníbal Limón
baf1798be1 rrs/recipes: Add support for persist search and filters.
Now when search something the URL is modified and you can
share the URL for access to the data.

[YOCTO #7809]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-12-01 18:02:59 -06:00
Aníbal Limón
45499f50c2 rrs/urls.py: Disable permanent (301) redirection on main view.
Don't redirect permanently in main view because the first URL needs
to point to the current release, so use permanent = False to return
a 302..

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-11-05 12:38:23 -06:00
Belen Barros Pena
214d70d4aa Update tool URL in status email
The status email sent to the Yocto Project mailing
list by the Recipe Reporting Tool still shows the
old URL (http://packages.yoctoproject.org).

This patch changes it to the new URL:

http://recipes.yoctoproject.org

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-10-23 09:33:02 -05:00
Aníbal Limón
1b78ec6132 rrs_upstream_history.py: Fix use regexes in packages
Make difference when handling suffixes or preffixes like 'nativesdk-'
when try to use regexes in packages that have suffixes like '-crosssdk'
it can contain the arch into it like binutils-crosssdk-x86_64.

Use split method in suffixes and replace method into preffixes, this
fixes issues with suffixes containing archs at end.

[YOCTO #8102]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-09-22 18:36:23 -05:00
Mariano Lopez
443779d02b rrs/views: Fix mismatch in summary and recipe list
This fixes the issue with the mismatch in the
statistics bar and the recipe list. The mismatch
is caused by the gcc-source recipe, because every
version of the recipe is counted in Upstream History
but not in Recipe Upgrade.

Also added the TODO.rrs to track bugs and issues with
rrs.

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-08-28 13:24:39 -05:00
Aníbal Limón
8af2a3d13a templates/rrs/recipes.html: Re-add the sort property into Maintainer.
When last updated colum comes we lost the sort property.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-08-19 08:50:50 -05:00
Mariano Lopez
1473c6264d rrs/base_toplevel.html: Navbar redesign
This provides changes in the front end for the
navbar, now it shows the percentage of recipes
up-to-date, not update, unknown and can't be
updated along with the number of recipes.

This also moves the update percentage to the
end and adds clarity to what it means.

This also moves the export list button the the
top bar.

[YOCTO #8020]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-08-17 14:59:56 -05:00
Mariano Lopez
865266ca7f rrs/views.py: Added percentages for navbar
This adds the percentage for all the recipes types
(up-to-date, not updated, unknown, can't be updated)
so it can be displayed in the navbar.

This also adds the number of the recipes not updated
at the begining of the period and number of recipes
updated in the period.

The changes in the frontend are still missing, this
just adds the functionality.

[YOCTO #8020]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-08-17 14:59:26 -05:00
Belen Barros Pena
5440e10e62 rrs: avoid too many columns in the recipes table
Currently, when you select 'Can't be updated' in the upstream
status filter, the resulting table will add the 'No update reason'
column to the default column set.

Although this is probably useful information to see in the
table itself, it results in too many columns, and a rather
unpleasant layout change.

This patch hides the 'Summary' column whenever you select
'Can't be updated' in the upstream status filter, effectively
replacing the 'Summary' with the 'No update reason' column,
which is probably more relevant in this context. Now you
have less columns distracting you, and a slightly less
jumpy layout change.

A designer would have come up with this solution in the
first place. Sadly, she was never asked.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-08-17 14:57:10 -05:00
Belen Barros Pena
e5d6752be6 rrs: remove sorting from the 'No update reason' column
Nothing useful can come from sorting by this column.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-08-17 14:57:10 -05:00
Aníbal Limón
d882336f7e rrs_upstream_history.py: Use regexes in SPECIAL_PKGSUFFIX packages
When SPECIAL_PKGSUFFIX packages don't have regexes use it from package
without SPECIAL_PKGSUFFIX.

[YOCTO #8102]

For example: python-native use regex from python if don't have one.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-08-10 14:35:20 -05:00
Mariano Lopez
b0f7cdc468 recipes.html: Format change for last updated column
This changes the format of the last updated column.
Now the column text is set to the default text color.

[YOCTO #8018]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2015-07-29 10:20:49 -05:00
Mariano Lopez
e1881ed0a3 rrs-additional.css: Added min-width to last update column
This adds the min-width for the last updated column
to the css.

[YOCTO #8018]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2015-07-29 10:20:42 -05:00
Mariano Lopez
9b1c29a9ff views.py: Show last updated date for all recipes
This changes the behavior of the last update column
and show the date for all the recipes, including the
up to date recipes.

[YOCTO #8018]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2015-07-29 10:20:28 -05:00
Aníbal Limón
7c09b47907 rrs/tools: UpstreamHistory only load current recipe files.
Don't load all recipes avaiable in layer because was previous
filtered to have the last version.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-07-14 19:25:57 -05:00
Aníbal Limón
c314485b01 rrs/tools: get_recipe_pv_without_srcrev add support for discard prefixes
Avoid version prefixes like v|r into all versions.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-07-14 18:36:53 -05:00
Aníbal Limón
ad5ccc214f rrs: Fix last updated.
Don't conditional last updated to upstream status.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-07-14 18:22:14 -05:00
Aníbal Limón
d8b6e988de rrs/tools: Add daily_run.sh script for provide updates.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-07-14 17:38:16 -05:00
Aníbal Limón
c21f32b0ea rrs/tools/rrs_upgrade_history.py: Don't take into account git recipes
without versioning.

Don't detect upgrade in git recipes that don't have versioning only
PV=git.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-07-14 16:41:46 -05:00
Aníbal Limón
87bef7fed5 rrs/views.py: RecipeListView always use recipes from history.
If recipe don't exist in history means that don't need to be displayed.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-07-14 16:23:00 -05:00
Mariano Lopez
44416d5e50 models.py: Code cleanup
Cleaned up the class Raw to have better readability.
Also added docstring to methods in this class.

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-07-14 16:17:58 -05:00