Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id E005EE00F61; Tue, 2 Aug 2016 06:32:15 -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.220.50 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-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 60CB5E00F5C for ; Tue, 2 Aug 2016 06:32:13 -0700 (PDT) Received: by mail-pa0-f50.google.com with SMTP id pp5so63589901pac.3 for ; Tue, 02 Aug 2016 06:32:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=Mj1x9sscVkT4xHXErQQ6/ACPM36kPpxryuQXvR3C9Hg=; b=oKLcfRFUlZMsPc/svGLo8rSZrK/O4paLUW1/vUDSJA6Gk1J60LzfWqjhC4CzRf9wOC 2zmV/j6Nz4KtRBZw3OMVDW/gKsXas1kabIsvv9Z0bwtKVliBGUZfWrhFi9744Z7ooxm9 m2j5f3aB8ojeQzRJlafcHduqtTSvzYppwxTvy3X9d85+P6Mp0K/D1RcqQAwU8462/xly m7QhHNHYQujvZYTQ6FmIzMBXqiI/gVd3qHL2gIFNCS5QnquvGVQxXR4UEgxFD1vbFkrS RlHuL7qncLA5JafcP8YaEi/JEXMd/SL49wyIDstsnUHk9MhEaxQrW/8uDHkvdpFwwYej KX+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Mj1x9sscVkT4xHXErQQ6/ACPM36kPpxryuQXvR3C9Hg=; b=WYrDII8/xd6tUsw4u799tQMBztudOZ5uUHH2BZS4WuDW/6GuORlJV55YhqgMtVB231 Yr1iBHZvutS0/ShtAxKi69k8i9l0h6CJV3LgUsnfVMYeHF7xuuWq/JI4WG6Nrr/u68zR gA5gV/Nn6tvCgVlnWjvJRZmf+Os/O8PIcrHxLxRX0NbVmC/quXTvfgmEOtJbpEw9jzlI h26vJ4wIK/vOGGbe7FrRCiYWs6mXhUE3+2qBXH0BU4ulUyAMkb718hf3VKOkDLQb8MlP LwvYyNM5nKrVq20k5shU8qtvt0DU+j0L6O93kK4YE6tq7NpkETuipcpsFpsNtQri+Wme Xohg== X-Gm-Message-State: AEkooutOeajigcGeuUDl3RzPBMpg23jFa/kwLYLIMUq24Md7sNB1PID7XNiqvZ12uoi7wGIa X-Received: by 10.66.9.42 with SMTP id w10mr105356781paa.34.1470144732995; Tue, 02 Aug 2016 06:32:12 -0700 (PDT) Received: from orion.ger.corp.intel.com (fmdmzpr02-ext.fm.intel.com. [192.55.55.37]) by smtp.gmail.com with ESMTPSA id s1sm5049532paz.47.2016.08.02.06.32.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Aug 2016 06:32:12 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Tue, 2 Aug 2016 14:32:01 +0100 Message-Id: <1470144726-5273-1-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [PATCH 0/5] replace custom loadconf with loaddata 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: Tue, 02 Aug 2016 13:32:16 -0000 Replace the custom loadconf command with django's own inbuilt loaddata command. Django's command is much better tested, supports multiple formats and makes for much easier customisation of Toaster. We check the TEMPLATECONF value to determine if Toaster is running within poky or OpenEmbedded-core. And fallback if no value is found. Based on this we can load default data for the correct environment the first time you run Toaster. - settings.xml This contains Toaster wide settings, such as the default values for certain bitbake variables. - poky.xml This is the release metadata for supported poky based setup - oe-core.xml This is the release metadata for supported oe-core based setups As we also want to allow customisation of Toaster at start up added is a mechanism to load a "custom" fixture if present in the fixtures directory (see README). After this is merged we can. Remove toasterconf.json in the OpenEmbedded-core layer and the copy in the meta-poky layer. While testing this I added one unrelated patch which is to add a spinner for parsing/http fetch on the layerindex fetcher - When on a slow connection/machine it's not clear if downloading and parsing the data from the Layerindex is still underway so add some visual feedback. Michael Wood (5): toaster: Add poky and openembedded configuration fixtures toaster: checksettings call django's loaddata instead of custom command toaster: lsupdates Add spinner for parsing/http fetch toaster: Remove old toaster config loading mechanism toaster: fixtures Add README bitbake/bin/toaster | 18 +-- .../management/commands/checksettings.py | 88 +++++----- .../bldcontrol/management/commands/loadconf.py | 179 --------------------- bitbake/lib/toaster/orm/fixtures/README | 30 ++++ bitbake/lib/toaster/orm/fixtures/oe-core.xml | 57 +++++++ bitbake/lib/toaster/orm/fixtures/poky.xml | 105 ++++++++++++ bitbake/lib/toaster/orm/fixtures/settings.xml | 36 +++++ .../toaster/orm/management/commands/lsupdates.py | 35 +++- 8 files changed, 307 insertions(+), 241 deletions(-) delete mode 100644 bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py create mode 100644 bitbake/lib/toaster/orm/fixtures/README create mode 100644 bitbake/lib/toaster/orm/fixtures/oe-core.xml create mode 100644 bitbake/lib/toaster/orm/fixtures/poky.xml create mode 100644 bitbake/lib/toaster/orm/fixtures/settings.xml -- 2.7.4