From: George Dunlap <george.dunlap@eu.citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH 7/8] raisin: Rework component specification
Date: Mon, 20 Apr 2015 10:19:49 +0100 [thread overview]
Message-ID: <5534C4B5.7080900@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1504171138430.7690@kaball.uk.xensource.com>
On 04/17/2015 11:40 AM, Stefano Stabellini wrote:
> On Thu, 16 Apr 2015, George Dunlap wrote:
>> Allow COMPONENTS to be specified in the config (or on the command-line)
>>
>> Now you can keep all components enabled in your config but build only
>> one like so:
>>
>> COMPONENTS="xen" ./raise build
>>
>> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
>> ---
>> CC: Stefano Stabellini <stefano.stabellini@citrix.com>
>> ---
>> defconfig | 5 +++++
>> lib/common-functions.sh | 49 +++++++++++++++++++++++++++++++++++--------------
>> 2 files changed, 40 insertions(+), 14 deletions(-)
>>
>> diff --git a/defconfig b/defconfig
>> index 23c76eb..4ec8a0b 100644
>> --- a/defconfig
>> +++ b/defconfig
>> @@ -1,5 +1,10 @@
>> # Config variables for raisin
>>
>> +# Components
>> +# All components: xen grub libvirt
>> +# Core xen functionality: xen
>> +DEFAULT_COMPONENTS="xen grub libvirt"
>> +
>> # Build config
>> ## Make command to run
>> MAKE="make -j2"
>> diff --git a/lib/common-functions.sh b/lib/common-functions.sh
>> index e66c6f4..42406e9 100644
>> --- a/lib/common-functions.sh
>> +++ b/lib/common-functions.sh
>> @@ -31,13 +31,41 @@ function common_init() {
>>
>> get_distro
>> get_arch
>> + get_components
>>
>> - for f in `cat "$BASEDIR"/components/series`
>> + echo "Distro: $DISTRO"
>> + echo "Arch: $ARCH"
>> + echo "Components: $COMPONENTS"
>> +
>> + for f in $COMPONENTS
>> do
>> source "$BASEDIR"/components/"$f"
>> done
>> }
>>
>> +function get_components() {
>> + if [[ -z "$COMPONENTS" ]]
>> + then
>> + COMPONENTS="$DEFAULT_COMPONENTS"
>> + fi
>> +
>> + if [[ -z "$COMPONENTS" ]]
>> + then
>> + local component
>> + for component in `cat "$BASEDIR"/components/series`
>> + do
>> + local capital
>> + capital=`echo $component | tr '[:lower:]' '[:upper:]'`
>> + if eval [[ ! -z \$"$capital"_UPSTREAM_REVISION ]]
>> + then
>> + COMPONENTS="$COMPONENTS $component"
>> + echo "Found component $component"
>> + fi
>> + done
>> + export COMPONENTS
>> + fi
>> +}
>> +
>> function get_distro() {
>> if [[ -x "`which lsb_release 2>/dev/null`" ]]
>> then
>> @@ -222,20 +250,13 @@ function stop_initscripts() {
>> }
>>
>> function for_each_component () {
>> - for component in `cat "$BASEDIR"/components/series`
>> + local component
>
> One important thing here is that the order is important: xen is the
> first item in the series file for a reason. I think we should use the
> COMPONENTS variable to check for what components are enabled, but then
> still use the series file for the ordering.
Yes, I thought about that. I had the idea it wouldn't be the easiest
thing to do in bash, but I'll take a look.
FYI I basically spent the "development day" for 4 weeks on those two
series, so it may be a while before I get back to it. :-) (Depends on
how much review there is to do.)
-George
next prev parent reply other threads:[~2015-04-20 9:19 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-16 16:19 [PATCH 1/8] raisin: Fix non-verbose case George Dunlap
2015-04-16 16:19 ` [PATCH 2/8] Include actual config in package, not defconfig George Dunlap
2015-04-17 10:10 ` Stefano Stabellini
2015-04-16 16:19 ` [PATCH 3/8] raisin: Use fakeroot for mkdeb so we can build the package as non-root George Dunlap
2015-04-17 8:43 ` Ian Campbell
2015-04-17 9:39 ` Stefano Stabellini
2015-04-20 17:08 ` Stefano Stabellini
2015-04-20 8:57 ` George Dunlap
2015-04-20 9:09 ` Ian Campbell
2015-04-16 16:19 ` [PATCH 4/8] raisin: Use PKGTYPE rather than DISTRO to determine how to build a package George Dunlap
2015-04-17 10:10 ` Stefano Stabellini
2015-04-20 17:08 ` Stefano Stabellini
2015-04-16 16:19 ` [PATCH 5/8] raisin: Fix CentOS build George Dunlap
2015-04-16 16:23 ` George Dunlap
2015-04-17 10:14 ` Stefano Stabellini
2015-04-20 9:04 ` George Dunlap
2015-04-20 10:29 ` Stefano Stabellini
2015-04-20 17:08 ` Stefano Stabellini
2015-04-16 16:19 ` [PATCH 6/8] raisin: Break build into components and allow the sub-steps to be called individually George Dunlap
2015-04-17 10:18 ` Stefano Stabellini
2015-04-20 9:05 ` George Dunlap
2015-04-16 16:19 ` [PATCH 7/8] raisin: Rework component specification George Dunlap
2015-04-17 10:37 ` Stefano Stabellini
2015-04-20 9:17 ` George Dunlap
2015-04-20 10:26 ` Stefano Stabellini
2015-04-17 10:40 ` Stefano Stabellini
2015-04-20 9:19 ` George Dunlap [this message]
2015-04-20 17:08 ` Stefano Stabellini
2015-04-16 16:19 ` [PATCH 8/8] raisin: RFC Add blktap2 as an external tree George Dunlap
2015-04-17 10:50 ` Stefano Stabellini
2015-04-17 11:04 ` Ian Campbell
2015-04-20 9:38 ` George Dunlap
2015-04-20 10:08 ` Stefano Stabellini
2015-04-17 10:58 ` Stefano Stabellini
2015-04-20 10:59 ` George Dunlap
2015-04-20 17:05 ` Stefano Stabellini
2015-04-21 9:25 ` Ian Campbell
2015-04-21 9:49 ` George Dunlap
2015-04-21 10:09 ` Stefano Stabellini
2015-04-21 10:30 ` George Dunlap
2015-04-21 10:42 ` Stefano Stabellini
2015-04-21 10:47 ` George Dunlap
2015-04-21 11:01 ` Dave Scott
2015-04-21 11:04 ` Dave Scott
2015-04-21 11:06 ` George Dunlap
2015-04-21 11:20 ` Dave Scott
2015-04-21 10:06 ` Stefano Stabellini
2015-04-17 10:06 ` [PATCH 1/8] raisin: Fix non-verbose case Stefano Stabellini
2015-04-20 8:49 ` George Dunlap
2015-04-20 10:01 ` Stefano Stabellini
2015-04-20 17:07 ` Stefano Stabellini
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=5534C4B5.7080900@eu.citrix.com \
--to=george.dunlap@eu.citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.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.