diff mbox

[RFC,OSSTEST,v1,09/12] mfi-common: Set diversion for build & test host install

Message ID 1452263399-14094-9-git-send-email-ian.campbell@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Campbell Jan. 8, 2016, 2:29 p.m. UTC
This means that bisections will use the same version, even if
production-config changed in the mean time.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 mfi-common | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Comments

Ian Jackson Jan. 12, 2016, 2:41 p.m. UTC | #1
Ian Campbell writes ("[PATCH RFC OSSTEST v1 09/12] mfi-common: Set diversion for build & test host install"):
> This means that bisections will use the same version, even if
> production-config changed in the mean time.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Subject to anticipated change to the runvar name.

Ian.
Ian Campbell Jan. 15, 2016, 5:36 p.m. UTC | #2
On Fri, 2016-01-08 at 14:29 +0000, Ian Campbell wrote:
> This means that bisections will use the same version, even if
> production-config changed in the mean time.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
>  mfi-common | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/mfi-common b/mfi-common
> index 44e7b3e..c1c4ec5 100644
> --- a/mfi-common
> +++ b/mfi-common
> @@ -123,7 +123,11 @@ create_build_jobs () {
>          local suite=`getconfig DebianSuite`
>      fi
>  
> -    hostos_runvars="all_host_suite=$suite"
> +    if [ -z "$diversion" ] ; then
> +        local diversion=`getconfig TftpDiVersion`
> +    fi

Having dropped "05/12] make-*flight: Abolish $defsuite and $guestdefsuite"
it now looks odd to define $diversion here like this.

Would it be preferable to do
	def_di_version=`getconfig TftpDiVersion`
in make-*flight and treat this like suite=$defsuite etc do you think?

Also, I was considering moving:
    defsuite=`getconfig DebianSuite`
    defguestsuite=`getconfig GuestDebianSuite`
from make-*flight to mfi-common as:
   : ${defsuite:=`getconfig DebianSuite`}
   : ${defguestsuite:=`getconfig GuestDebianSuite`}
and putting def_di_version (and likely def_guest_di_version) there too.

Do you think this is a good idea? It would mean mfi-common now sets
variables whereas today it only exports functions, I don't think that is a
problem though.

Ian.
diff mbox

Patch

diff --git a/mfi-common b/mfi-common
index 44e7b3e..c1c4ec5 100644
--- a/mfi-common
+++ b/mfi-common
@@ -123,7 +123,11 @@  create_build_jobs () {
         local suite=`getconfig DebianSuite`
     fi
 
-    hostos_runvars="all_host_suite=$suite"
+    if [ -z "$diversion" ] ; then
+        local diversion=`getconfig TftpDiVersion`
+    fi
+
+    hostos_runvars="all_host_suite=$suite all_host_diversion=$diversion"
 
     # In 4.4 onwards xend is off by default. If necessary we build a
     # separate set of binaries with xend enabled in order to run those
@@ -408,7 +412,11 @@  test_matrix_iterate () {
         local guestsuite=`getconfig GuestDebianSuite`
     fi
 
-    hostos_runvars="all_host_suite=$suite"
+    if [ -z "$diversion" ] ; then
+        local diversion=`getconfig TftpDiVersion`
+    fi
+
+    hostos_runvars="all_host_suite=$suite all_host_diversion=$diversion"
 
     for kern in ''; do