public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/2] Separation of isar images per machine
@ 2019-03-17 23:01 Maxim Yu. Osipov
  2019-03-17 23:01 ` [PATCH 1/2] classes/image: Unify and add missing extra stamps Maxim Yu. Osipov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Maxim Yu. Osipov @ 2019-03-17 23:01 UTC (permalink / raw)
  To: isar-users

Hello everybody,

This series is a result of discussion expressed in email 
by Baurzhan Ismagulov at 14/03/2019: 

>>>>>>>
Regarding the structure, I find the separation
tmp/work/${DISTRO}-${DISTRO_ARCH}/${MACHINE} more intuitive, since one can
clearly see from the directory structure what belongs together:

* ${DISTRO}-${DISTRO_ARCH} + machine1
* ${DISTRO}-${DISTRO_ARCH} + machine2

rather than

* ${DISTRO_ARCH}-${DISTRO} + all-${DISTRO} + machine1-${DISTRO}
* ${DISTRO_ARCH}-${DISTRO} + all-${DISTRO} + machine2-${DISTRO}

Besides, all-${DISTRO} requires careful consideration, since OE really builds
them once by default, whereas we would build the _all.debs for every arch. That
is a good point, because we could optimize some bits here (dpkg-buildpackage
--build=all).
>>>>>>>>

Regards,
Maxim. 

Maxim Yu. Osipov (2):
  classes/image: Unify and add missing extra stamps
  meta-isar: Separate images per MACHINE

 meta/classes/image.bbclass      | 11 ++++++++---
 meta/classes/isar-image.bbclass |  2 +-
 2 files changed, 9 insertions(+), 4 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] classes/image: Unify and add missing extra stamps
  2019-03-17 23:01 [PATCH 0/2] Separation of isar images per machine Maxim Yu. Osipov
@ 2019-03-17 23:01 ` Maxim Yu. Osipov
  2019-03-17 23:01 ` [PATCH 2/2] meta-isar: Separate images per MACHINE Maxim Yu. Osipov
  2019-03-19 10:39 ` [PATCH 0/2] Separation of isar images per machine Maxim Yu. Osipov
  2 siblings, 0 replies; 4+ messages in thread
From: Maxim Yu. Osipov @ 2019-03-17 23:01 UTC (permalink / raw)
  To: isar-users

Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
---
 meta/classes/image.bbclass | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index a60441c..bebac6b 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -97,7 +97,10 @@ python set_image_size () {
     d.setVarFlag('ROOTFS_SIZE', 'export', '1')
 }
 
-do_rootfs[stamp-extra-info] = "${MACHINE}-${DISTRO}"
+do_fetch[stamp-extra-info] = "${DISTRO}-${MACHINE}"
+do_unpack[stamp-extra-info] = "${DISTRO}-${MACHINE}"
+
+do_rootfs[stamp-extra-info] = "${DISTRO}-${MACHINE}"
 do_rootfs[depends] = "isar-apt:do_cache_config isar-bootstrap-target:do_bootstrap"
 
 do_rootfs() {
@@ -114,6 +117,8 @@ do_mark_rootfs() {
         "${IMAGE_ROOTFS}"
 }
 
+do_mark_rootfs[stamp-extra-info] = "${DISTRO}-${MACHINE}"
+
 addtask mark_rootfs before do_copy_boot_files do_transform_template after do_rootfs
 
 do_copy_boot_files() {
@@ -171,7 +176,7 @@ do_populate_sdk() {
     ln -Tfsr ${SDKCHROOT_DIR}/rootfs ${DEPLOY_DIR_IMAGE}/sdk-${DISTRO}-${DISTRO_ARCH}
 }
 
-do_populate_sdk[stamp-extra-info] = "${MACHINE}-${DISTRO}"
+do_populate_sdk[stamp-extra-info] = "${DISTRO}-${MACHINE}"
 do_populate_sdk[depends] = "sdkchroot:do_build"
 
 addtask populate_sdk after do_rootfs
@@ -180,7 +185,7 @@ inherit base-apt-helper
 
 do_cache_base_repo[depends] = "base-apt:do_cache_config"
 do_cache_base_repo[lockfiles] = "${REPO_BASE_DIR}/isar.lock"
-do_cache_base_repo[stamp-extra-info] = "${MACHINE}-${DISTRO}"
+do_cache_base_repo[stamp-extra-info] = "${DISTRO}-${MACHINE}"
 
 do_cache_base_repo() {
     if [ -d ${WORKDIR}/apt_cache ]; then
-- 
2.11.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] meta-isar: Separate images per MACHINE
  2019-03-17 23:01 [PATCH 0/2] Separation of isar images per machine Maxim Yu. Osipov
  2019-03-17 23:01 ` [PATCH 1/2] classes/image: Unify and add missing extra stamps Maxim Yu. Osipov
@ 2019-03-17 23:01 ` Maxim Yu. Osipov
  2019-03-19 10:39 ` [PATCH 0/2] Separation of isar images per machine Maxim Yu. Osipov
  2 siblings, 0 replies; 4+ messages in thread
From: Maxim Yu. Osipov @ 2019-03-17 23:01 UTC (permalink / raw)
  To: isar-users

Image directory gets overwritten when running for two targets
with the same pair DISTRO and DISTRO_ARCH, resulting
start_vm script failure.

Create isar-image* working directories
under ${DISTRO}-${DISTRO_ARCH}/${MACHINE} subdirectory.

Co-authored-by: Baurzhan Ismagulov <ibr@ilbers.de>
Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
---
 meta/classes/isar-image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/isar-image.bbclass b/meta/classes/isar-image.bbclass
index cdd1651..e7a5dee 100644
--- a/meta/classes/isar-image.bbclass
+++ b/meta/classes/isar-image.bbclass
@@ -19,7 +19,7 @@ DEPENDS += "${IMAGE_INSTALL} ${IMAGE_TRANSIENT_PACKAGES}"
 
 IMAGE_TRANSIENT_PACKAGES += "isar-cfg-localepurge isar-cfg-rootpw"
 
-WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}"
+WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${MACHINE}/${PN}"
 
 ISAR_RELEASE_CMD_DEFAULT = "git -C ${LAYERDIR_core} describe --tags --dirty --match 'v[0-9].[0-9]*'"
 ISAR_RELEASE_CMD ?= "${ISAR_RELEASE_CMD_DEFAULT}"
-- 
2.11.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] Separation of isar images per machine
  2019-03-17 23:01 [PATCH 0/2] Separation of isar images per machine Maxim Yu. Osipov
  2019-03-17 23:01 ` [PATCH 1/2] classes/image: Unify and add missing extra stamps Maxim Yu. Osipov
  2019-03-17 23:01 ` [PATCH 2/2] meta-isar: Separate images per MACHINE Maxim Yu. Osipov
@ 2019-03-19 10:39 ` Maxim Yu. Osipov
  2 siblings, 0 replies; 4+ messages in thread
From: Maxim Yu. Osipov @ 2019-03-19 10:39 UTC (permalink / raw)
  To: isar-users

On 3/18/19 12:01 AM, Maxim Yu. Osipov wrote:
> Hello everybody,
> 
> This series is a result of discussion expressed in email
> by Baurzhan Ismagulov at 14/03/2019:
> 
>>>>>>>>
> Regarding the structure, I find the separation
> tmp/work/${DISTRO}-${DISTRO_ARCH}/${MACHINE} more intuitive, since one can
> clearly see from the directory structure what belongs together:
> 
> * ${DISTRO}-${DISTRO_ARCH} + machine1
> * ${DISTRO}-${DISTRO_ARCH} + machine2
> 
> rather than
> 
> * ${DISTRO_ARCH}-${DISTRO} + all-${DISTRO} + machine1-${DISTRO}
> * ${DISTRO_ARCH}-${DISTRO} + all-${DISTRO} + machine2-${DISTRO}
> 
> Besides, all-${DISTRO} requires careful consideration, since OE really builds
> them once by default, whereas we would build the _all.debs for every arch. That
> is a good point, because we could optimize some bits here (dpkg-buildpackage
> --build=all).
>>>>>>>>>
> 
> Regards,
> Maxim.

Applied to the 'next'.


> Maxim Yu. Osipov (2):
>    classes/image: Unify and add missing extra stamps
>    meta-isar: Separate images per MACHINE
> 
>   meta/classes/image.bbclass      | 11 ++++++++---
>   meta/classes/isar-image.bbclass |  2 +-
>   2 files changed, 9 insertions(+), 4 deletions(-)
> 


-- 
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-19 10:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-17 23:01 [PATCH 0/2] Separation of isar images per machine Maxim Yu. Osipov
2019-03-17 23:01 ` [PATCH 1/2] classes/image: Unify and add missing extra stamps Maxim Yu. Osipov
2019-03-17 23:01 ` [PATCH 2/2] meta-isar: Separate images per MACHINE Maxim Yu. Osipov
2019-03-19 10:39 ` [PATCH 0/2] Separation of isar images per machine Maxim Yu. Osipov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox