Commit Graph

7 Commits

Author SHA1 Message Date
Paul Eggleton
577e62e62f import_layers: switch to argparse
No functionality changes, just a code upgrade.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-08-06 11:38:01 +12:00
Paul Eggleton
71ff6571c6 import_layers: import other missing items
Import Machine, Distro, BBClass, BBAppend, IncFile objects.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-08-06 09:55:34 +12:00
Paul Eggleton
150b774cce import_layers: import recipes
Import recipe data from the REST API, including sub-recipe objects
(sources, patches, PACKAGE_CONFIGs, dependencies etc.) now that they are
available from the API. Also, with the data being more or less complete,
it's also reasonable to also set the vcs_* fields so that we can tell
how up-to-date it is.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-08-06 09:54:43 +12:00
Paul Eggleton
5352a227ab import_layers: enable incremental LayerItem/LayerBranch import
Don't assume we need to create these objects - check the updated field
value against what the API reports and update the existing object if the
latter is newer.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-08-05 16:18:00 +12:00
Paul Eggleton
8861ccfa19 import_layers: avoid importing duplicate objects
For LayerDependency, LayerMaintainer and LayerNote objects, properly
sync the objects in the database with the objects fetched from the API.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-08-05 16:18:00 +12:00
Paul Eggleton
e033154f4f import_layers: fix URL construction
If you specified only the layer index URL and not the full API URL i.e.
https://layers.openembedded.org then we put an extra slash in the URL
which resulted in the request being redirected to the main page which
breaks the request.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:31:04 +12:00
Paul Eggleton
98be24336b Add a script to import layers from an existing layer index
Add a script that uses the REST API to gather information from another
running layer index instance (e.g. layers.openembedded.org) and import
that into the local index. Only information for branches that are
already set up is imported, and only manually entered information -
no recipes, machines, etc.

Partially implements [YOCTO #9760].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-08-06 14:38:40 +02:00