From: Michael Wood <michael.g.wood@intel.com>
To: "Smith, Elliot" <elliot.smith@intel.com>
Cc: toaster@yoctoproject.org
Subject: Re: [PATCH 0/9] database clean ups
Date: Wed, 6 Jul 2016 17:26:27 +0100 [thread overview]
Message-ID: <577D3133.1030402@intel.com> (raw)
In-Reply-To: <CA+1hgUgehM=fBgF-L57QTR5UDxUX+LTYbuz+GdODeMz_1i_rrw@mail.gmail.com>
On 06/07/16 16:43, Smith, Elliot wrote:
> On 5 July 2016 at 16:40, Michael Wood <michael.g.wood@intel.com
> <mailto:michael.g.wood@intel.com>> wrote:
>
> Preparation work for fixing a number of issues with adding layers
> (non-git and otherwise) and creating initial configuration by
> cleaning up some of the redundant/awkward/complex bits of the
> database.
>
> This branch is available on poky-contrib
> michaelw/toaster/database_clean_ups
>
> Some current patches on the mailing list will cause a conflict
> with this branch so I will almost certainly have to roll a v2 of
> this, but it can be reviewed.
>
>
> A few comments on these patches:
>
> * _reduce_canon_path() and _get_id_for_sourcetype() in loadconf.py can
> be removed, as they're no longer used anywhere.
Ah yes, I probably didn't remove those as they came up in a `git grep`
in bldcontrol/tests.py ...yeah those tests are useless so can be removed.
Once a lot of the redundant complexities are removed the end game will,
I hope to remove loadconf.py entirely and use django's data loader
>
> The imports in loadconf.py include LayerSource, which can be removed
> once these functions have been removed.
>
> The tests for these two functions in
> bitbake/lib/toaster/bldcontrol/tests.py can be removed.
>
> * There's no longer a releaselayersourcepriority model. Does this have
> any effect if there are multiple layers associated with a release from
> different sources, all of which provide the same recipe? (I'm assuming
> this is what that model used to be for.) Or does bitbake just sort
> this out for us?
Bitbake doesn't really care about layers in this sense afaik, I think
the correct way of doing this sort of preference is by setting the
PREFERRED_VERSIONfor a recipe you're building in the project
configuration. Having multiple identical layers for a single release
never happened in practice because of the constraint that layers for a
particular release are unique as the UI became far too confusing
otherwise. If you wanted two openembedded-cores for example you would
have two different layers and you would probably add the appropriate one
to your project rather than having potentially two in there and hoping
toaster/bitbake will choose the right one (the global priority system
also was pretty inflexible as once it was setup you couldn't change it
for a project anyway).
>
> * This line (around 160) in views.py is a bit of an eyesore:
>
> "detail": "(%s" % x.layer.vcs_url + (")" if x.release == None else "
> | "+x.get_vcs_reference()+")"),
Agreed! it's not my code! I just replaced the variable name. Hopefully
we will replace this code soon (bug #9519)
>
> * I'd personally prefer the layer_source field on LayerVersion to be
> renamed as layer_source_type, as it now refers to an enum, rather than
> another object. But this is minor and can be left if it's a lot of work.
Yeah I did consider this, as it's just an enum it can easily be changed,
but for minimising changes which might break things I thought it would
be better to stick with the old variable names, though it turned out
that it didn't appear in that many places. I can change this when I rebase.
>
> Elliot
>
>
>
> Michael Wood (9):
> toaster: loadconf remove Loading LayerSources
> toaster: bldcollector admin Remove LayerSourceAdmin
> toaster: models Remove LayerSource models and replace with enum
> toaster: lsupdates Add layerindex fetcher
> toaster: Replace references to LayerSource models
> toaster: tests: Remove references to LayerSource model
> toaster: lsupdates Add progress information and clean up logging
> toaster: orm Remove the layerindex specific up_branch fields
> toaster: admin Add Layer_Version to the admin-able models
>
> bitbake/lib/bb/ui/buildinfohelper.py | 6 +-
> bitbake/lib/toaster/bldcollector/admin.py | 22 +-
> .../bldcontrol/management/commands/loadconf.py | 71 +--
> .../toaster/orm/management/commands/lsupdates.py | 289 +++++++++++-
> .../0008_delete_layer_source_references.py | 118 +++++
> .../orm/migrations/0009_delete_layersource.py | 17 +
> .../0010_use_release_instead_of_up_branch.py | 60 +++
> bitbake/lib/toaster/orm/models.py | 500
> +++++----------------
> bitbake/lib/toaster/orm/tests.py | 180 --------
> .../fixtures/toastergui-unittest-data.xml | 60 +--
> .../toaster/toastergui/templates/layerdetails.html | 6 +-
> bitbake/lib/toaster/toastergui/tests.py | 5 +-
> bitbake/lib/toaster/toastergui/views.py | 75 ++--
> 13 files changed, 674 insertions(+), 735 deletions(-)
> create mode 100644
> bitbake/lib/toaster/orm/migrations/0008_delete_layer_source_references.py
> create mode 100644
> bitbake/lib/toaster/orm/migrations/0009_delete_layersource.py
> create mode 100644
> bitbake/lib/toaster/orm/migrations/0010_use_release_instead_of_up_branch.py
> delete mode 100644 bitbake/lib/toaster/orm/tests.py
>
> --
> 2.7.4
>
> --
> _______________________________________________
> toaster mailing list
> toaster@yoctoproject.org <mailto:toaster@yoctoproject.org>
> https://lists.yoctoproject.org/listinfo/toaster
>
>
>
>
> --
> Elliot Smith
> Software Engineer
> Intel Open Source Technology Centre
>
> ---------------------------------------------------------------------
> Intel Corporation (UK) Limited
> Registered No. 1134945 (England)
> Registered Office: Pipers Way, Swindon SN3 1RJ
> VAT No: 860 2173 47
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
prev parent reply other threads:[~2016-07-06 16:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-05 15:40 [PATCH 0/9] database clean ups Michael Wood
2016-07-05 15:40 ` [PATCH 1/9] toaster: loadconf remove Loading LayerSources Michael Wood
2016-07-05 15:40 ` [PATCH 2/9] toaster: bldcollector admin Remove LayerSourceAdmin Michael Wood
2016-07-05 15:40 ` [PATCH 3/9] toaster: models Remove LayerSource models and replace with enum Michael Wood
2016-07-05 15:40 ` [PATCH 4/9] toaster: lsupdates Add layerindex fetcher Michael Wood
2016-07-05 15:40 ` [PATCH 5/9] toaster: Replace references to LayerSource models Michael Wood
2016-07-05 15:40 ` [PATCH 6/9] toaster: tests: Remove references to LayerSource model Michael Wood
2016-07-05 15:40 ` [PATCH 7/9] toaster: lsupdates Add progress information and clean up logging Michael Wood
2016-07-05 15:40 ` [PATCH 8/9] toaster: orm Remove the layerindex specific up_branch fields Michael Wood
2016-07-05 15:40 ` [PATCH 9/9] toaster: admin Add Layer_Version to the admin-able models Michael Wood
2016-07-06 15:43 ` [PATCH 0/9] database clean ups Smith, Elliot
2016-07-06 16:26 ` Michael Wood [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=577D3133.1030402@intel.com \
--to=michael.g.wood@intel.com \
--cc=elliot.smith@intel.com \
--cc=toaster@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.