Provide a mechanism set the maintainer for things like gcc-cross-<arch>
to the same as gcc. (We do have entries in the .inc file for these,
however they aren't useful as they don't match the recipe name when we
parse it, and due to the fact that RecipeMaintainer objects link
directly to Recipe objects, we can't handle entries that don't map to a
real recipe).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
We don't actually need to check out the repository until we actually
analyse a commit, so avoid doing so. Additionally, there's not much
point in checking out master at the end, let the next script invocation
do that if needed (if it needs to, it should since otherwise there's no
guarantee what state the repository is in).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Add an option that deletes all maintainer history records for the
current layer branch so that they can then be reloaded from scratch.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
We don't really need to clean up the repository, we'll take care of it
on subsequent runs.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
If a recipe upgrade only consists of a .inc file changing, we were not
picking it up, since we were only looking specifically for recipes
(.bb). If a .inc file changes, assume all .bb files in the same
directory (if any) should be parsed to look for an upgrade.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
load_recipes() was leaving files around in /tmp; on my Fedora system
this eventually resulted in /tmp running out of space which we do not
want.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Sometimes it's useful to be able to re-try processing a particular
commit (generally in conjunction with --dry-run), so add an option to
enable that.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
We were parsing recipes that were in the repository but not inside the
actual layer we're dealing with (e.g. we have meta-selftest within the
OE-Core repository, containing a number of recipes that are only
intended for testing purposes and should not be looked at by this
script).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
If an exception occurs during parsing, let's actually see what kind of
exception it was in the output.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
In OE-Core revision e0531174119bff21e9014b95ed1bbd0e1c01af26 we
accidentally committed a new e2fsprogs recipe with ..bb at the end of
its name instead of .bb. This was fixed immediately afterwards, but when
the RRS hits this commit, it doesn't fail immediately, but the bogus
version "1.43." gets into the database and all subsequent commits
touching the e2fsprogs recipe cause bb.utils.vercmp_part() to blow up
because one of the version parts in the "previous" version in the database
is apparently empty. To work around this and any similar issues, just
reject any change that results in such a broken version string (on the
assumption that it'll be corrected in a subsequent commit and thus we
will get to re-parse the recipe then and therefore not miss the
upgrade.)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
We check out different revisions while we do this processing, and so
does the layer index update script, so we shouldn't be allowing both to
run at once or nasty stuff will happen.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Since we're now executing a separate script per commit, we should try
not to do that unless the commit actually touches recipe files in order
to avoid wasting time.
(Whilst it's possible that a change to a bbclass might alter what's in
the recipe, we can ignore that since we are only concerned with actual
upgrades which would always require some sort of change to the recipe or
an include file, so we can safely skip commits that don't do that.)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Instead of arbitrarily importing the last 8 days of upgrades, record the
date and commit when we do an import, and then use that information the
next time the script is run.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
We should expect multiple matches for layerbranch + pn, so use filter()
instead of get() and take the first id that matches.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
We're calling translate() on the string deep in the bowels of the
parsing code and that doesn't work well if the string is unicode, so
convert it to a plain string first. That won't work well if the filename
is unicode but the chances of that with a recipe is pretty small I would
think.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Use try...finally to ensure we shut down tinfoil, but since we are
potentially dealing with older bitbake releases when importing older
upgrades, only call shutdown() if it's actually there (and although it's
unlikely, guard against the broken shutdown() in fido as we do in the
main layer index update script).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
If you want to go back and get history for the earlier releases (krogoth
and previous) then we need to be able to support both python 2 and 3,
which practically means we need the same split for this script as we
have for the main layer index update script.
The catch here is that since we are going back and following the history
of changes forward, we basically need to use the same version of bitbake
that was current at that time. This works except for around the
transition between python 2 to 3 where the metadata lagged behind a bit,
so we need to take that into account. In order to keep things generic we
have a date field on the maintenance plan layer branch that specifies
the date in the metadata where we should switch over to python 3, and
then link to PythonEnvironment records that should be used for python 2
and 3 respectively.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
With Django 1.10+, if you use get_template() to retrieve a template,
then you can't pass a context when calling .render() on it, you need to
pass a dict instead.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* Use maintenance plans to get layerbranches
* Use from/to/subject and admin contact from maintenance plan
* Use an actual template to render the email (and drop tabulate
dependency)
* Improve grammar in the email text
* Use a single line to represent the most recent commit
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This function is no longer needed - we now rely upon the layer index's
code to do this (update through the update script, and checkout through
setup_layer()).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Remove hardcoded references to the poky repository, and process
layerbranches for all enabled maintenance plans.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Without this it's not clear what's happening if debug mode is enabled
and you are waiting for the parsing step.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
If the Recipe object doesn't exist here then an exception will be raised
rather than None being returned, and this will also trigger if multiple
recipes match. This may have never triggered in the past because this
would have been run right after updating all the recipes in the layer and
clearing out duplicates (which we were doing earlier), and thus what is
in the database would match the recipe files in the repository, assuming
no errors occurred during parsing). We can't remove duplicates though so
we need to switch over to using filter() and taking the first recipe.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Remove hardcoded references to the poky repository, and process
layerbranches for all enabled maintenance plans.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This is never going to work, the only way we can practically do parallel
execution is to run these things in a task which would basically amount
to distrodata's do_checkpkg; we may move to that in future but for now
just drop the threading code.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Instead of hardcoded references to the poky repository, look for any
maintainers.inc file in layers associated with the layerbranches for all
enabled maintenance plans. At present few layers have this file, but at
least it will now work generically in any layer index instance.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Instead of processing all layerbranches, only process those associated
with an enabled maintenance plan. This is one step towards being able to
use the RRS together with a more general layer index database.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
We don't need to create branches here, and we don't need to actually
check anything out unless we're going to parse, so we can save a bit of
time by not doing so.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Add the ability to run the scripts without writing changes back to the
database, for debugging purposes.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
We can't just delete arbitrary recipes that do exist in the layer if
we're in a general layer index database. We'll need to handle this in a
different way, or just live with the fact that there will be duplicate
entries.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Due to bitbake client/server changes now the meta path isn't included
to sys.path when load tinfoil.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
This are causing a failure when access the remote datastore.
File "rrs/rrs/tools/rrs_upstream_history.py", line 169, in <module>
set_regexes(recipe_data)
File "rrs/rrs/tools/rrs_upstream_history.py", line 53, in set_regexes
if any(d.getVar(var, True) for var in variables):
File "rrs/rrs/tools/rrs_upstream_history.py", line 53, in <genexpr>
if any(d.getVar(var, True) for var in variables):
File "/srv/rrs/layers/bitbake/lib/bb/data_smart.py", line 608, in
getVar
return self.getVarFlag(var, "_content", expand, noweakdefault,
parsing)
File "/srv/rrs/layers/bitbake/lib/bb/data_smart.py", line 723, in
getVarFlag
local_var, overridedata = self._findVar(var)
File "/srv/rrs/layers/bitbake/lib/bb/data_smart.py", line 480, in
_findVar
return connector.getVar(var)
File "/srv/rrs/layers/bitbake/lib/bb/tinfoil.py", line 62, in getVar
value = self.tinfoil.run_command('dataStoreConnectorFindVar',
self.dsindex, name)
File "/srv/rrs/layers/bitbake/lib/bb/tinfoil.py", line 316, in
run_command
raise TinfoilCommandFailed(result[1])
bb.tinfoil.TinfoilCommandFailed: Traceback (most recent call last):
File "/srv/rrs/layers/bitbake/lib/bb/command.py", line 81, in
runCommand
result = command_method(self, commandline)
File "/srv/rrs/layers/bitbake/lib/bb/command.py", line 465, in
dataStoreConnectorFindVar
datastore = command.remotedatastores[dsindex]
File "/srv/rrs/layers/bitbake/lib/bb/remotedata.py", line 39, in
__getitem__
return self.datastores[key]
TypeError: unhashable type: 'list'
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
The new tinfoil API acts as a client/server so isn't need to work
around creating process to avoid errors in cooker with different
data revisions.
Also add a try/except when create an upgrade display the error.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
The new client/server API of tinfoil requires explicit call of
shutdown method to send the event for finalize cooker process.
[YOCTO #10863]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Django 1.6 provides a context manager for atomic transactions so
update the way for make db transactions.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Due to multi-configuration builds in bitbake now is needed
to use a tinfoil cache instance instead of call directly in
bb.cache.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
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>
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>