* [PATCH] meta/classes:Add wic tooling for related images
@ 2019-07-23 13:49 Quirin Gylstorff
2019-07-23 14:18 ` Henning Schild
2019-07-23 15:04 ` [PATCH v2] " Quirin Gylstorff
0 siblings, 2 replies; 10+ messages in thread
From: Quirin Gylstorff @ 2019-07-23 13:49 UTC (permalink / raw)
To: isar-users
The dependencies for wic are only added if IMAGE_TYPE
is equal to "wic-img". If a image type depends on the
wic-image class it is no longer possible to build a
wic image.
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
meta/classes/image-tools-extension.bbclass | 6 ------
meta/classes/wic-img.bbclass | 4 ++++
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/meta/classes/image-tools-extension.bbclass b/meta/classes/image-tools-extension.bbclass
index b8672d5..ca94d49 100644
--- a/meta/classes/image-tools-extension.bbclass
+++ b/meta/classes/image-tools-extension.bbclass
@@ -14,12 +14,6 @@ IMAGER_INSTALL ??= ""
IMAGER_BUILD_DEPS ??= ""
DEPENDS += "${IMAGER_BUILD_DEPS}"
-python () {
- if d.getVar('IMAGE_TYPE', True) == 'wic-img':
- d.appendVar('IMAGER_INSTALL',
- ' ' + d.getVar('WIC_IMAGER_INSTALL', True))
-}
-
do_install_imager_deps[depends] = "buildchroot-target:do_build"
do_install_imager_deps[deptask] = "do_deploy_deb"
do_install_imager_deps[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
index 94f0b02..eee27b3 100644
--- a/meta/classes/wic-img.bbclass
+++ b/meta/classes/wic-img.bbclass
@@ -11,6 +11,10 @@ do_copy_wks_template () {
cp -f '${WKS_TEMPLATE_PATH}' '${WORKDIR}/${WKS_TEMPLATE_FILE}'
}
+
+IMAGER_INSTALL = ${WIC_IMAGER_INSTALL}
+
+
python () {
import itertools
import re
--
2.20.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] meta/classes:Add wic tooling for related images
2019-07-23 13:49 [PATCH] meta/classes:Add wic tooling for related images Quirin Gylstorff
@ 2019-07-23 14:18 ` Henning Schild
2019-07-23 14:42 ` Quirin Gylstorff
2019-07-23 15:04 ` [PATCH v2] " Quirin Gylstorff
1 sibling, 1 reply; 10+ messages in thread
From: Henning Schild @ 2019-07-23 14:18 UTC (permalink / raw)
To: [ext] Quirin Gylstorff; +Cc: isar-users
I do not remember why it is done like that. The original code most
likely came from me. But probably at a time where IMAGER_INSTALL did
not yet exist. So it effectively messed with IMAGE_PREINSTALL.
Would have to go back in history and read changes. If my assumption
(legacy left overs from before IMAGER_INSTALL) is correct this patch is
probably correct. But maybe there is another reason.
Did you go back a few "git blame"s and read the commit messages and
comments around the python function?
Henning
Am Tue, 23 Jul 2019 15:49:47 +0200
schrieb "[ext] Quirin Gylstorff" <quirin.gylstorff@siemens.com>:
> The dependencies for wic are only added if IMAGE_TYPE
> is equal to "wic-img". If a image type depends on the
> wic-image class it is no longer possible to build a
> wic image.
>
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
> meta/classes/image-tools-extension.bbclass | 6 ------
> meta/classes/wic-img.bbclass | 4 ++++
> 2 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/meta/classes/image-tools-extension.bbclass
> b/meta/classes/image-tools-extension.bbclass index b8672d5..ca94d49
> 100644 --- a/meta/classes/image-tools-extension.bbclass
> +++ b/meta/classes/image-tools-extension.bbclass
> @@ -14,12 +14,6 @@ IMAGER_INSTALL ??= ""
> IMAGER_BUILD_DEPS ??= ""
> DEPENDS += "${IMAGER_BUILD_DEPS}"
>
> -python () {
> - if d.getVar('IMAGE_TYPE', True) == 'wic-img':
> - d.appendVar('IMAGER_INSTALL',
> - ' ' + d.getVar('WIC_IMAGER_INSTALL', True))
> -}
> -
> do_install_imager_deps[depends] = "buildchroot-target:do_build"
> do_install_imager_deps[deptask] = "do_deploy_deb"
> do_install_imager_deps[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
> diff --git a/meta/classes/wic-img.bbclass
> b/meta/classes/wic-img.bbclass index 94f0b02..eee27b3 100644
> --- a/meta/classes/wic-img.bbclass
> +++ b/meta/classes/wic-img.bbclass
> @@ -11,6 +11,10 @@ do_copy_wks_template () {
> cp -f '${WKS_TEMPLATE_PATH}' '${WORKDIR}/${WKS_TEMPLATE_FILE}'
> }
>
> +
> +IMAGER_INSTALL = ${WIC_IMAGER_INSTALL}
> +
> +
> python () {
> import itertools
> import re
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] meta/classes:Add wic tooling for related images
2019-07-23 14:18 ` Henning Schild
@ 2019-07-23 14:42 ` Quirin Gylstorff
2019-07-23 14:56 ` Claudius Heine
2019-07-23 15:15 ` Henning Schild
0 siblings, 2 replies; 10+ messages in thread
From: Quirin Gylstorff @ 2019-07-23 14:42 UTC (permalink / raw)
To: Henning Schild; +Cc: isar-users
On 7/23/19 4:18 PM, Henning Schild wrote:
> I do not remember why it is done like that. The original code most
> likely came from me. But probably at a time where IMAGER_INSTALL did
> not yet exist. So it effectively messed with IMAGE_PREINSTALL.
>
> Would have to go back in history and read changes. If my assumption
> (legacy left overs from before IMAGER_INSTALL) is correct this patch is
> probably correct. But maybe there is another reason.
>
> Did you go back a few "git blame"s and read the commit messages and
> comments around the python function?
>
> Henning
The code was originally created with commit 8c4d3ed8 to replace a
workaround for the image creation. The commit switches to the
IMAGER_INSTALL mechanism away from some hack. Afterwards the code moved
to image-tools-extension.bbclass with commit 0f9ae5bc. Between these
changes I did not find any comments why it is restricting the usage.
Quirin
>
> Am Tue, 23 Jul 2019 15:49:47 +0200
> schrieb "[ext] Quirin Gylstorff" <quirin.gylstorff@siemens.com>:
>
>> The dependencies for wic are only added if IMAGE_TYPE
>> is equal to "wic-img". If a image type depends on the
>> wic-image class it is no longer possible to build a
>> wic image.
>>
>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> ---
>> meta/classes/image-tools-extension.bbclass | 6 ------
>> meta/classes/wic-img.bbclass | 4 ++++
>> 2 files changed, 4 insertions(+), 6 deletions(-)
>>
>> diff --git a/meta/classes/image-tools-extension.bbclass
>> b/meta/classes/image-tools-extension.bbclass index b8672d5..ca94d49
>> 100644 --- a/meta/classes/image-tools-extension.bbclass
>> +++ b/meta/classes/image-tools-extension.bbclass
>> @@ -14,12 +14,6 @@ IMAGER_INSTALL ??= ""
>> IMAGER_BUILD_DEPS ??= ""
>> DEPENDS += "${IMAGER_BUILD_DEPS}"
>>
>> -python () {
>> - if d.getVar('IMAGE_TYPE', True) == 'wic-img':
>> - d.appendVar('IMAGER_INSTALL',
>> - ' ' + d.getVar('WIC_IMAGER_INSTALL', True))
>> -}
>> -
>> do_install_imager_deps[depends] = "buildchroot-target:do_build"
>> do_install_imager_deps[deptask] = "do_deploy_deb"
>> do_install_imager_deps[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
>> diff --git a/meta/classes/wic-img.bbclass
>> b/meta/classes/wic-img.bbclass index 94f0b02..eee27b3 100644
>> --- a/meta/classes/wic-img.bbclass
>> +++ b/meta/classes/wic-img.bbclass
>> @@ -11,6 +11,10 @@ do_copy_wks_template () {
>> cp -f '${WKS_TEMPLATE_PATH}' '${WORKDIR}/${WKS_TEMPLATE_FILE}'
>> }
>>
>> +
>> +IMAGER_INSTALL = ${WIC_IMAGER_INSTALL}
>> +
>> +
>> python () {
>> import itertools
>> import re
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] meta/classes:Add wic tooling for related images
2019-07-23 14:42 ` Quirin Gylstorff
@ 2019-07-23 14:56 ` Claudius Heine
2019-07-23 15:15 ` Henning Schild
1 sibling, 0 replies; 10+ messages in thread
From: Claudius Heine @ 2019-07-23 14:56 UTC (permalink / raw)
To: [ext] Quirin Gylstorff, Henning Schild; +Cc: isar-users
On 23/07/2019 16.42, [ext] Quirin Gylstorff wrote:
>
>
> On 7/23/19 4:18 PM, Henning Schild wrote:
>> I do not remember why it is done like that. The original code most
>> likely came from me. But probably at a time where IMAGER_INSTALL did
>> not yet exist. So it effectively messed with IMAGE_PREINSTALL.
>>
>> Would have to go back in history and read changes. If my assumption
>> (legacy left overs from before IMAGER_INSTALL) is correct this patch is
>> probably correct. But maybe there is another reason.
>>
>> Did you go back a few "git blame"s and read the commit messages and
>> comments around the python function?
>>
>> Henning
>
>
> The code was originally created with commit 8c4d3ed8 to replace a
> workaround for the image creation. The commit switches to the
> IMAGER_INSTALL mechanism away from some hack.
Well this code was originally written in commit:
5026e58f08aba98a01f7bef160d0a3163219b6c4
Author: Henning Schild <henning.schild@siemens.com>
Date: Fri Apr 13 16:19:00 2018 +0200
images: New class wic-img for wic intregration
This patch integrates wic into the bitbake workflow, wic will be used
for the imaging step, no need to call it manually.
After all the previous reverts we now use an unmodified version of wic.
Issues:
- wic was never integrated
- you always had to build an ext4-img to create a wic image later
- there was never a way to control the size of wic disks/partition,
only directly in the wks
- wic used to leak the hosts bootloader into the final image
Impact:
The patch solves the Issues, but drops the ability to manually start
wic after bitbake. And it drops support for building wic images for
Distros before stretch.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Afterwards the code moved
> to image-tools-extension.bbclass with commit 0f9ae5bc. Between these
> changes I did not find any comments why it is restricting the usage.
>
> Quirin
>
>
>>
>> Am Tue, 23 Jul 2019 15:49:47 +0200
>> schrieb "[ext] Quirin Gylstorff" <quirin.gylstorff@siemens.com>:
>>
>>> The dependencies for wic are only added if IMAGE_TYPE
>>> is equal to "wic-img". If a image type depends on the
>>> wic-image class it is no longer possible to build a
>>> wic image.
>>>
>>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>> ---
>>> meta/classes/image-tools-extension.bbclass | 6 ------
>>> meta/classes/wic-img.bbclass | 4 ++++
>>> 2 files changed, 4 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/meta/classes/image-tools-extension.bbclass
>>> b/meta/classes/image-tools-extension.bbclass index b8672d5..ca94d49
>>> 100644 --- a/meta/classes/image-tools-extension.bbclass
>>> +++ b/meta/classes/image-tools-extension.bbclass
>>> @@ -14,12 +14,6 @@ IMAGER_INSTALL ??= ""
>>> IMAGER_BUILD_DEPS ??= ""
>>> DEPENDS += "${IMAGER_BUILD_DEPS}"
>>> -python () {
>>> - if d.getVar('IMAGE_TYPE', True) == 'wic-img':
>>> - d.appendVar('IMAGER_INSTALL',
>>> - ' ' + d.getVar('WIC_IMAGER_INSTALL', True))
>>> -}
>>> -
>>> do_install_imager_deps[depends] = "buildchroot-target:do_build"
>>> do_install_imager_deps[deptask] = "do_deploy_deb"
>>> do_install_imager_deps[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
>>> diff --git a/meta/classes/wic-img.bbclass
>>> b/meta/classes/wic-img.bbclass index 94f0b02..eee27b3 100644
>>> --- a/meta/classes/wic-img.bbclass
>>> +++ b/meta/classes/wic-img.bbclass
>>> @@ -11,6 +11,10 @@ do_copy_wks_template () {
>>> cp -f '${WKS_TEMPLATE_PATH}' '${WORKDIR}/${WKS_TEMPLATE_FILE}'
>>> }
>>> +
>>> +IMAGER_INSTALL = ${WIC_IMAGER_INSTALL}
>>> +
>>> +
>>> python () {
>>> import itertools
>>> import re
>>
>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] meta/classes:Add wic tooling for related images
2019-07-23 13:49 [PATCH] meta/classes:Add wic tooling for related images Quirin Gylstorff
2019-07-23 14:18 ` Henning Schild
@ 2019-07-23 15:04 ` Quirin Gylstorff
2019-07-23 15:08 ` Claudius Heine
1 sibling, 1 reply; 10+ messages in thread
From: Quirin Gylstorff @ 2019-07-23 15:04 UTC (permalink / raw)
To: isar-users
The dependencies for wic are only added if IMAGE_TYPE
is equal to "wic-img". If a image type depends on the
wic-image class it is no longer possible to build a
wic image.
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
meta/classes/image-tools-extension.bbclass | 6 ------
meta/classes/wic-img.bbclass | 4 ++++
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/meta/classes/image-tools-extension.bbclass b/meta/classes/image-tools-extension.bbclass
index b8672d5..ca94d49 100644
--- a/meta/classes/image-tools-extension.bbclass
+++ b/meta/classes/image-tools-extension.bbclass
@@ -14,12 +14,6 @@ IMAGER_INSTALL ??= ""
IMAGER_BUILD_DEPS ??= ""
DEPENDS += "${IMAGER_BUILD_DEPS}"
-python () {
- if d.getVar('IMAGE_TYPE', True) == 'wic-img':
- d.appendVar('IMAGER_INSTALL',
- ' ' + d.getVar('WIC_IMAGER_INSTALL', True))
-}
-
do_install_imager_deps[depends] = "buildchroot-target:do_build"
do_install_imager_deps[deptask] = "do_deploy_deb"
do_install_imager_deps[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
index 94f0b02..f3c29dc 100644
--- a/meta/classes/wic-img.bbclass
+++ b/meta/classes/wic-img.bbclass
@@ -11,6 +11,9 @@ do_copy_wks_template () {
cp -f '${WKS_TEMPLATE_PATH}' '${WORKDIR}/${WKS_TEMPLATE_FILE}'
}
+
+
+
python () {
import itertools
import re
@@ -78,6 +81,7 @@ python () {
inherit buildchroot
+IMAGER_INSTALL += "${WIC_IMAGER_INSTALL}"
# wic comes with reasonable defaults, and the proper interface is the wks file
ROOTFS_EXTRA ?= "0"
--
2.20.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] meta/classes:Add wic tooling for related images
2019-07-23 15:04 ` [PATCH v2] " Quirin Gylstorff
@ 2019-07-23 15:08 ` Claudius Heine
2019-07-25 10:20 ` [PATCH v3] " Quirin Gylstorff
0 siblings, 1 reply; 10+ messages in thread
From: Claudius Heine @ 2019-07-23 15:08 UTC (permalink / raw)
To: [ext] Quirin Gylstorff, isar-users
Hi Quirin,
On 23/07/2019 17.04, [ext] Quirin Gylstorff wrote:
> The dependencies for wic are only added if IMAGE_TYPE
> is equal to "wic-img". If a image type depends on the
> wic-image class it is no longer possible to build a
> wic image.
>
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
> meta/classes/image-tools-extension.bbclass | 6 ------
> meta/classes/wic-img.bbclass | 4 ++++
> 2 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/meta/classes/image-tools-extension.bbclass b/meta/classes/image-tools-extension.bbclass
> index b8672d5..ca94d49 100644
> --- a/meta/classes/image-tools-extension.bbclass
> +++ b/meta/classes/image-tools-extension.bbclass
> @@ -14,12 +14,6 @@ IMAGER_INSTALL ??= ""
> IMAGER_BUILD_DEPS ??= ""
> DEPENDS += "${IMAGER_BUILD_DEPS}"
>
> -python () {
> - if d.getVar('IMAGE_TYPE', True) == 'wic-img':
> - d.appendVar('IMAGER_INSTALL',
> - ' ' + d.getVar('WIC_IMAGER_INSTALL', True))
> -}
> -
> do_install_imager_deps[depends] = "buildchroot-target:do_build"
> do_install_imager_deps[deptask] = "do_deploy_deb"
> do_install_imager_deps[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
> diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
> index 94f0b02..f3c29dc 100644
> --- a/meta/classes/wic-img.bbclass
> +++ b/meta/classes/wic-img.bbclass
> @@ -11,6 +11,9 @@ do_copy_wks_template () {
> cp -f '${WKS_TEMPLATE_PATH}' '${WORKDIR}/${WKS_TEMPLATE_FILE}'
> }
>
> +
> +
> +
Well that looks odd ;)
Cheers,
Claudius
> python () {
> import itertools
> import re
> @@ -78,6 +81,7 @@ python () {
>
> inherit buildchroot
>
> +IMAGER_INSTALL += "${WIC_IMAGER_INSTALL}"
> # wic comes with reasonable defaults, and the proper interface is the wks file
> ROOTFS_EXTRA ?= "0"
>
>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] meta/classes:Add wic tooling for related images
2019-07-23 14:42 ` Quirin Gylstorff
2019-07-23 14:56 ` Claudius Heine
@ 2019-07-23 15:15 ` Henning Schild
2019-07-23 15:24 ` Jan Kiszka
1 sibling, 1 reply; 10+ messages in thread
From: Henning Schild @ 2019-07-23 15:15 UTC (permalink / raw)
To: Quirin Gylstorff, Kiszka, Jan (CT RDA IOT SES-DE); +Cc: isar-users
Am Tue, 23 Jul 2019 16:42:42 +0200
schrieb Quirin Gylstorff <quirin.gylstorff@siemens.com>:
> On 7/23/19 4:18 PM, Henning Schild wrote:
> > I do not remember why it is done like that. The original code most
> > likely came from me. But probably at a time where IMAGER_INSTALL did
> > not yet exist. So it effectively messed with IMAGE_PREINSTALL.
> >
> > Would have to go back in history and read changes. If my assumption
> > (legacy left overs from before IMAGER_INSTALL) is correct this
> > patch is probably correct. But maybe there is another reason.
> >
> > Did you go back a few "git blame"s and read the commit messages and
> > comments around the python function?
> >
> > Henning
>
>
> The code was originally created with commit 8c4d3ed8 to replace a
> workaround for the image creation. The commit switches to the
> IMAGER_INSTALL mechanism away from some hack. Afterwards the code
> moved to image-tools-extension.bbclass with commit 0f9ae5bc. Between
> these changes I did not find any comments why it is restricting the
> usage.
8c4d3ed8d751a946d is coming from Jan and i could not figure out why he
did not do what you propose here. Jan could you comment on this one?
Going back further we have cab9c6488821 inventing IMAGER_INSTALL and
the first wic implementation before that 5026e58f08aba98a.
Henning
> Quirin
>
>
> >
> > Am Tue, 23 Jul 2019 15:49:47 +0200
> > schrieb "[ext] Quirin Gylstorff" <quirin.gylstorff@siemens.com>:
> >
> >> The dependencies for wic are only added if IMAGE_TYPE
> >> is equal to "wic-img". If a image type depends on the
> >> wic-image class it is no longer possible to build a
> >> wic image.
> >>
> >> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> >> ---
> >> meta/classes/image-tools-extension.bbclass | 6 ------
> >> meta/classes/wic-img.bbclass | 4 ++++
> >> 2 files changed, 4 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/meta/classes/image-tools-extension.bbclass
> >> b/meta/classes/image-tools-extension.bbclass index b8672d5..ca94d49
> >> 100644 --- a/meta/classes/image-tools-extension.bbclass
> >> +++ b/meta/classes/image-tools-extension.bbclass
> >> @@ -14,12 +14,6 @@ IMAGER_INSTALL ??= ""
> >> IMAGER_BUILD_DEPS ??= ""
> >> DEPENDS += "${IMAGER_BUILD_DEPS}"
> >>
> >> -python () {
> >> - if d.getVar('IMAGE_TYPE', True) == 'wic-img':
> >> - d.appendVar('IMAGER_INSTALL',
> >> - ' ' + d.getVar('WIC_IMAGER_INSTALL', True))
> >> -}
> >> -
> >> do_install_imager_deps[depends] = "buildchroot-target:do_build"
> >> do_install_imager_deps[deptask] = "do_deploy_deb"
> >> do_install_imager_deps[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
> >> diff --git a/meta/classes/wic-img.bbclass
> >> b/meta/classes/wic-img.bbclass index 94f0b02..eee27b3 100644
> >> --- a/meta/classes/wic-img.bbclass
> >> +++ b/meta/classes/wic-img.bbclass
> >> @@ -11,6 +11,10 @@ do_copy_wks_template () {
> >> cp -f '${WKS_TEMPLATE_PATH}'
> >> '${WORKDIR}/${WKS_TEMPLATE_FILE}' }
> >>
> >> +
> >> +IMAGER_INSTALL = ${WIC_IMAGER_INSTALL}
> >> +
> >> +
> >> python () {
> >> import itertools
> >> import re
> >
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] meta/classes:Add wic tooling for related images
2019-07-23 15:15 ` Henning Schild
@ 2019-07-23 15:24 ` Jan Kiszka
0 siblings, 0 replies; 10+ messages in thread
From: Jan Kiszka @ 2019-07-23 15:24 UTC (permalink / raw)
To: Henning Schild, Quirin Gylstorff; +Cc: isar-users
On 23.07.19 17:15, Henning Schild wrote:
> Am Tue, 23 Jul 2019 16:42:42 +0200
> schrieb Quirin Gylstorff <quirin.gylstorff@siemens.com>:
>
>> On 7/23/19 4:18 PM, Henning Schild wrote:
>>> I do not remember why it is done like that. The original code most
>>> likely came from me. But probably at a time where IMAGER_INSTALL did
>>> not yet exist. So it effectively messed with IMAGE_PREINSTALL.
>>>
>>> Would have to go back in history and read changes. If my assumption
>>> (legacy left overs from before IMAGER_INSTALL) is correct this
>>> patch is probably correct. But maybe there is another reason.
>>>
>>> Did you go back a few "git blame"s and read the commit messages and
>>> comments around the python function?
>>>
>>> Henning
>>
>>
>> The code was originally created with commit 8c4d3ed8 to replace a
>> workaround for the image creation. The commit switches to the
>> IMAGER_INSTALL mechanism away from some hack. Afterwards the code
>> moved to image-tools-extension.bbclass with commit 0f9ae5bc. Between
>> these changes I did not find any comments why it is restricting the
>> usage.
>
> 8c4d3ed8d751a946d is coming from Jan and i could not figure out why he
> did not do what you propose here. Jan could you comment on this one?
>
I don't remember any obvious reason. If things work now, and we should have
plenty of test cases for this, this change is fine.
Jan
> Going back further we have cab9c6488821 inventing IMAGER_INSTALL and
> the first wic implementation before that 5026e58f08aba98a.
>
> Henning
>
>> Quirin
>>
>>
>>>
>>> Am Tue, 23 Jul 2019 15:49:47 +0200
>>> schrieb "[ext] Quirin Gylstorff" <quirin.gylstorff@siemens.com>:
>>>
>>>> The dependencies for wic are only added if IMAGE_TYPE
>>>> is equal to "wic-img". If a image type depends on the
>>>> wic-image class it is no longer possible to build a
>>>> wic image.
>>>>
>>>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>>> ---
>>>> meta/classes/image-tools-extension.bbclass | 6 ------
>>>> meta/classes/wic-img.bbclass | 4 ++++
>>>> 2 files changed, 4 insertions(+), 6 deletions(-)
>>>>
>>>> diff --git a/meta/classes/image-tools-extension.bbclass
>>>> b/meta/classes/image-tools-extension.bbclass index b8672d5..ca94d49
>>>> 100644 --- a/meta/classes/image-tools-extension.bbclass
>>>> +++ b/meta/classes/image-tools-extension.bbclass
>>>> @@ -14,12 +14,6 @@ IMAGER_INSTALL ??= ""
>>>> IMAGER_BUILD_DEPS ??= ""
>>>> DEPENDS += "${IMAGER_BUILD_DEPS}"
>>>>
>>>> -python () {
>>>> - if d.getVar('IMAGE_TYPE', True) == 'wic-img':
>>>> - d.appendVar('IMAGER_INSTALL',
>>>> - ' ' + d.getVar('WIC_IMAGER_INSTALL', True))
>>>> -}
>>>> -
>>>> do_install_imager_deps[depends] = "buildchroot-target:do_build"
>>>> do_install_imager_deps[deptask] = "do_deploy_deb"
>>>> do_install_imager_deps[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
>>>> diff --git a/meta/classes/wic-img.bbclass
>>>> b/meta/classes/wic-img.bbclass index 94f0b02..eee27b3 100644
>>>> --- a/meta/classes/wic-img.bbclass
>>>> +++ b/meta/classes/wic-img.bbclass
>>>> @@ -11,6 +11,10 @@ do_copy_wks_template () {
>>>> cp -f '${WKS_TEMPLATE_PATH}'
>>>> '${WORKDIR}/${WKS_TEMPLATE_FILE}' }
>>>>
>>>> +
>>>> +IMAGER_INSTALL = ${WIC_IMAGER_INSTALL}
>>>> +
>>>> +
>>>> python () {
>>>> import itertools
>>>> import re
>>>
>
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3] meta/classes:Add wic tooling for related images
2019-07-23 15:08 ` Claudius Heine
@ 2019-07-25 10:20 ` Quirin Gylstorff
2019-08-01 4:26 ` Baurzhan Ismagulov
0 siblings, 1 reply; 10+ messages in thread
From: Quirin Gylstorff @ 2019-07-25 10:20 UTC (permalink / raw)
To: isar-users; +Cc: Claudius Heine
The dependencies for wic are only added if IMAGE_TYPE
is equal to "wic-img". If a image type depends on the
wic-image class it is no longer possible to build a
wic image.
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
Changes in v3:
- remove empty lines
Changes in v2:
- move below inherit buildchroot
meta/classes/image-tools-extension.bbclass | 6 ------
meta/classes/wic-img.bbclass | 1 +
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/meta/classes/image-tools-extension.bbclass b/meta/classes/image-tools-extension.bbclass
index b8672d5..ca94d49 100644
--- a/meta/classes/image-tools-extension.bbclass
+++ b/meta/classes/image-tools-extension.bbclass
@@ -14,12 +14,6 @@ IMAGER_INSTALL ??= ""
IMAGER_BUILD_DEPS ??= ""
DEPENDS += "${IMAGER_BUILD_DEPS}"
-python () {
- if d.getVar('IMAGE_TYPE', True) == 'wic-img':
- d.appendVar('IMAGER_INSTALL',
- ' ' + d.getVar('WIC_IMAGER_INSTALL', True))
-}
-
do_install_imager_deps[depends] = "buildchroot-target:do_build"
do_install_imager_deps[deptask] = "do_deploy_deb"
do_install_imager_deps[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
index 94f0b02..1ccbe55 100644
--- a/meta/classes/wic-img.bbclass
+++ b/meta/classes/wic-img.bbclass
@@ -78,6 +78,7 @@ python () {
inherit buildchroot
+IMAGER_INSTALL += "${WIC_IMAGER_INSTALL}"
# wic comes with reasonable defaults, and the proper interface is the wks file
ROOTFS_EXTRA ?= "0"
--
2.20.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3] meta/classes:Add wic tooling for related images
2019-07-25 10:20 ` [PATCH v3] " Quirin Gylstorff
@ 2019-08-01 4:26 ` Baurzhan Ismagulov
0 siblings, 0 replies; 10+ messages in thread
From: Baurzhan Ismagulov @ 2019-08-01 4:26 UTC (permalink / raw)
To: isar-users
On Thu, Jul 25, 2019 at 12:20:50PM +0200, Quirin Gylstorff wrote:
> The dependencies for wic are only added if IMAGE_TYPE
> is equal to "wic-img". If a image type depends on the
> wic-image class it is no longer possible to build a
> wic image.
Applied to next, thanks.
With kind regards,
Baurzhan.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-08-01 4:26 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 13:49 [PATCH] meta/classes:Add wic tooling for related images Quirin Gylstorff
2019-07-23 14:18 ` Henning Schild
2019-07-23 14:42 ` Quirin Gylstorff
2019-07-23 14:56 ` Claudius Heine
2019-07-23 15:15 ` Henning Schild
2019-07-23 15:24 ` Jan Kiszka
2019-07-23 15:04 ` [PATCH v2] " Quirin Gylstorff
2019-07-23 15:08 ` Claudius Heine
2019-07-25 10:20 ` [PATCH v3] " Quirin Gylstorff
2019-08-01 4:26 ` Baurzhan Ismagulov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox