diff mbox series

[auto-upgrade-helper] upgrade-helper: fix testimage check

Message ID 20240527175850.1256122-1-tgamblin@baylibre.com
State New
Headers show
Series [auto-upgrade-helper] upgrade-helper: fix testimage check | expand

Commit Message

Trevor Gamblin May 27, 2024, 5:58 p.m. UTC
AUH's testimage logic is still checking for BB_ENV_EXTRAWHITE instead of
BB_ENV_PASSTHROUGH_ADDITIONS, and INHERIT += "testimage" instead of
IMAGE_CLASSES += "testimage". Update it so that checks for the correct
variable names.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
 modules/testimage.py | 2 +-
 upgrade-helper.py    | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Alexander Kanavin May 27, 2024, 6:10 p.m. UTC | #1
remote: ##############################################
remote: Invalid author Trevor Gamblin via lists.yoctoproject.org
remote: ##############################################


I could probably fix this up, but perhaps it's better to do it on your side.

Alex

On Mon, 27 May 2024 at 19:58, Trevor Gamblin via
lists.yoctoproject.org <tgamblin=baylibre.com@lists.yoctoproject.org>
wrote:
>
> AUH's testimage logic is still checking for BB_ENV_EXTRAWHITE instead of
> BB_ENV_PASSTHROUGH_ADDITIONS, and INHERIT += "testimage" instead of
> IMAGE_CLASSES += "testimage". Update it so that checks for the correct
> variable names.
>
> Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
> ---
>  modules/testimage.py | 2 +-
>  upgrade-helper.py    | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/modules/testimage.py b/modules/testimage.py
> index 0fc1adb..fb2e467 100644
> --- a/modules/testimage.py
> +++ b/modules/testimage.py
> @@ -53,7 +53,7 @@ class TestImage():
>          self.logdir = os.path.join(uh_work_dir, "testimage-logs")
>          os.mkdir(self.logdir)
>
> -        os.environ['BB_ENV_EXTRAWHITE'] = os.environ['BB_ENV_EXTRAWHITE'] + \
> +        os.environ['BB_ENV_PASSTHROUGH_ADDITIONS'] = os.environ['BB_ENV_PASSTHROUGH_ADDITIONS'] + \
>              " CORE_IMAGE_EXTRA_INSTALL TEST_LOG_DIR TESTIMAGE_UPDATE_VARS"
>
>      def _get_pkgs_to_install(self, pkgs):
> diff --git a/upgrade-helper.py b/upgrade-helper.py
> index 869dc3f..e307d60 100755
> --- a/upgrade-helper.py
> +++ b/upgrade-helper.py
> @@ -262,7 +262,7 @@ class Updater(object):
>          enabled = False
>
>          if settings.get("testimage", "no") == "yes":
> -            if 'testimage' in self.base_env['INHERIT']:
> +            if 'testimage' in self.base_env['IMAGE_CLASSES']:
>                  if not "ptest" in self.base_env["DISTRO_FEATURES"]:
>                      E(" testimage requires ptest in DISTRO_FEATURES please add to"\
>                        " conf/local.conf.")
> @@ -271,8 +271,8 @@ class Updater(object):
>                  enabled = True
>              else:
>                  E(" testimage was enabled in upgrade-helper.conf"\
> -                  " but isn't INHERIT in conf/local.conf, if you want"\
> -                  " to enable please set.")
> +                  " but isn't added to IMAGE_CLASSES in conf/local.conf, \
> +                    if you want to enable please set.")
>                  exit(1)
>
>          return enabled
> --
> 2.45.1
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#212): https://lists.yoctoproject.org/g/yocto-patches/message/212
> Mute This Topic: https://lists.yoctoproject.org/mt/106334515/1686489
> Group Owner: yocto-patches+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13197349/1686489/315264618/xyzzy [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Trevor Gamblin May 27, 2024, 7:02 p.m. UTC | #2
On 2024-05-27 2:10 p.m., Alexander Kanavin wrote:
> remote: ##############################################
> remote: Invalid author Trevor Gamblin via lists.yoctoproject.org
> remote: ##############################################
>
>
> I could probably fix this up, but perhaps it's better to do it on your side.

Is there something that needs to be set in my gitconfig or elsewhere?

Trevor

>
> Alex
>
> On Mon, 27 May 2024 at 19:58, Trevor Gamblin via
> lists.yoctoproject.org <tgamblin=baylibre.com@lists.yoctoproject.org>
> wrote:
>> AUH's testimage logic is still checking for BB_ENV_EXTRAWHITE instead of
>> BB_ENV_PASSTHROUGH_ADDITIONS, and INHERIT += "testimage" instead of
>> IMAGE_CLASSES += "testimage". Update it so that checks for the correct
>> variable names.
>>
>> Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
>> ---
>>   modules/testimage.py | 2 +-
>>   upgrade-helper.py    | 6 +++---
>>   2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/modules/testimage.py b/modules/testimage.py
>> index 0fc1adb..fb2e467 100644
>> --- a/modules/testimage.py
>> +++ b/modules/testimage.py
>> @@ -53,7 +53,7 @@ class TestImage():
>>           self.logdir = os.path.join(uh_work_dir, "testimage-logs")
>>           os.mkdir(self.logdir)
>>
>> -        os.environ['BB_ENV_EXTRAWHITE'] = os.environ['BB_ENV_EXTRAWHITE'] + \
>> +        os.environ['BB_ENV_PASSTHROUGH_ADDITIONS'] = os.environ['BB_ENV_PASSTHROUGH_ADDITIONS'] + \
>>               " CORE_IMAGE_EXTRA_INSTALL TEST_LOG_DIR TESTIMAGE_UPDATE_VARS"
>>
>>       def _get_pkgs_to_install(self, pkgs):
>> diff --git a/upgrade-helper.py b/upgrade-helper.py
>> index 869dc3f..e307d60 100755
>> --- a/upgrade-helper.py
>> +++ b/upgrade-helper.py
>> @@ -262,7 +262,7 @@ class Updater(object):
>>           enabled = False
>>
>>           if settings.get("testimage", "no") == "yes":
>> -            if 'testimage' in self.base_env['INHERIT']:
>> +            if 'testimage' in self.base_env['IMAGE_CLASSES']:
>>                   if not "ptest" in self.base_env["DISTRO_FEATURES"]:
>>                       E(" testimage requires ptest in DISTRO_FEATURES please add to"\
>>                         " conf/local.conf.")
>> @@ -271,8 +271,8 @@ class Updater(object):
>>                   enabled = True
>>               else:
>>                   E(" testimage was enabled in upgrade-helper.conf"\
>> -                  " but isn't INHERIT in conf/local.conf, if you want"\
>> -                  " to enable please set.")
>> +                  " but isn't added to IMAGE_CLASSES in conf/local.conf, \
>> +                    if you want to enable please set.")
>>                   exit(1)
>>
>>           return enabled
>> --
>> 2.45.1
>>
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#212): https://lists.yoctoproject.org/g/yocto-patches/message/212
>> Mute This Topic: https://lists.yoctoproject.org/mt/106334515/1686489
>> Group Owner: yocto-patches+owner@lists.yoctoproject.org
>> Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13197349/1686489/315264618/xyzzy [alex.kanavin@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>>
Alexander Kanavin May 27, 2024, 7:46 p.m. UTC | #3
On Mon, 27 May 2024 at 21:02, Trevor Gamblin <tgamblin@baylibre.com> wrote:
> > remote: ##############################################
> > remote: Invalid author Trevor Gamblin via lists.yoctoproject.org
> > remote: ##############################################
> >
> >
> > I could probably fix this up, but perhaps it's better to do it on your side.
>
> Is there something that needs to be set in my gitconfig or elsewhere?

You need to convince git to unconditionally add a From: line at the
start of the message body. By default it does that only if the mail
sender and patch author differ.

Alex
diff mbox series

Patch

diff --git a/modules/testimage.py b/modules/testimage.py
index 0fc1adb..fb2e467 100644
--- a/modules/testimage.py
+++ b/modules/testimage.py
@@ -53,7 +53,7 @@  class TestImage():
         self.logdir = os.path.join(uh_work_dir, "testimage-logs")
         os.mkdir(self.logdir)
 
-        os.environ['BB_ENV_EXTRAWHITE'] = os.environ['BB_ENV_EXTRAWHITE'] + \
+        os.environ['BB_ENV_PASSTHROUGH_ADDITIONS'] = os.environ['BB_ENV_PASSTHROUGH_ADDITIONS'] + \
             " CORE_IMAGE_EXTRA_INSTALL TEST_LOG_DIR TESTIMAGE_UPDATE_VARS"
 
     def _get_pkgs_to_install(self, pkgs):
diff --git a/upgrade-helper.py b/upgrade-helper.py
index 869dc3f..e307d60 100755
--- a/upgrade-helper.py
+++ b/upgrade-helper.py
@@ -262,7 +262,7 @@  class Updater(object):
         enabled = False
 
         if settings.get("testimage", "no") == "yes":
-            if 'testimage' in self.base_env['INHERIT']:
+            if 'testimage' in self.base_env['IMAGE_CLASSES']:
                 if not "ptest" in self.base_env["DISTRO_FEATURES"]:
                     E(" testimage requires ptest in DISTRO_FEATURES please add to"\
                       " conf/local.conf.")
@@ -271,8 +271,8 @@  class Updater(object):
                 enabled = True
             else:
                 E(" testimage was enabled in upgrade-helper.conf"\
-                  " but isn't INHERIT in conf/local.conf, if you want"\
-                  " to enable please set.")
+                  " but isn't added to IMAGE_CLASSES in conf/local.conf, \
+                    if you want to enable please set.")
                 exit(1)
 
         return enabled