From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 27C70E00DA0; Wed, 6 Jul 2016 09:26:32 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.192.177 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-pf0-f177.google.com (mail-pf0-f177.google.com [209.85.192.177]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 9E5B2E00CE7 for ; Wed, 6 Jul 2016 09:26:30 -0700 (PDT) Received: by mail-pf0-f177.google.com with SMTP id h14so81025146pfe.1 for ; Wed, 06 Jul 2016 09:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=YS0JKm1v4pNhhsoisSzW0mR3WBQyCAkudQuJU1ykYTc=; b=SHGhlB+r+RYL3Hzd7aNdhG1MulJKSStt2LqQEz8lQi+/S1ma/l2DpIDdU+ldHS9iRX kDOgfg0WIiaiy7s92QzwzCXHnV/IWbAYdtYs/eVemPluUdFeIELHQJTl8wwrv7dehoBW kIsK3Mw9fHTwEsxmzHoEBGgYH8mK1IvXI3YFyouKMZQUZEF/w/VYCHstU3h514F4T59E Y8eA3jPH3ya7by0n12BS/g6yCmMU9YaYoAACoyCqy9Goy6pu3zE4d3P7KBHOvP0YCp5/ OwXcy7Y2T14iMW85TdELBHeA5RmE9SBtUK3OnB7FhbvNdgvxHuMDldgUFLcVMAs/0xq3 Ow5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=YS0JKm1v4pNhhsoisSzW0mR3WBQyCAkudQuJU1ykYTc=; b=COt8uqMvy0sOQ3+yrBGcqBv9d3iCKgjXVlZ6eMGGzMcFOKevdPXCm3+P7g1KTO3LN7 rlMZQqAr4xWBZa7/JrbX+6GWcmeN5/lBjDjaCeMXs4TrytW2JdVaQ0nUGLXw/oEGXimu +FF78AOft60xA9PAzoEVek/32yOri383Qb//BU0eCuvqdjogPHGNHbY84qtjkqmPXq1y 571bttmTpS6VBVrsNfO7/PUZxiSRI8XCKtKB/1JQhrIeNfn5ivvRwOYgZMd+ErLaXkY+ nttULQNdx95L1gEa5WHo2+MkWsKWTDuLYA+c3Yis22aEN22AmSqbgvqsfyAlu2qTBKw8 c5yQ== X-Gm-Message-State: ALyK8tKG5iqaWPyIcpMaYDBKgd+WtLkMz+JlvVtnR8iDvoSsPUZ/J3pz1o+Lthv8rbBKI/zo X-Received: by 10.98.107.129 with SMTP id g123mr43573461pfc.62.1467822389818; Wed, 06 Jul 2016 09:26:29 -0700 (PDT) Received: from [192.168.0.78] (host86-169-85-169.range86-169.btcentralplus.com. [86.169.85.169]) by smtp.googlemail.com with ESMTPSA id 6sm4926968pfs.29.2016.07.06.09.26.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Jul 2016 09:26:29 -0700 (PDT) To: "Smith, Elliot" References: <1467733217-3185-1-git-send-email-michael.g.wood@intel.com> From: Michael Wood Message-ID: <577D3133.1030402@intel.com> Date: Wed, 6 Jul 2016 17:26:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: Cc: toaster@yoctoproject.org Subject: Re: [PATCH 0/9] database clean ups X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2016 16:26:32 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 06/07/16 16:43, Smith, Elliot wrote: > On 5 July 2016 at 16:40, Michael Wood > 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 > 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. >