public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v2] dpkg-base: Drop dependency on buildchroot
@ 2023-01-10  7:55 Jan Kiszka
  2023-01-10 19:37 ` Baurzhan Ismagulov
  2023-01-24  7:37 ` Uladzimir Bely
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Kiszka @ 2023-01-10  7:55 UTC (permalink / raw)
  To: isar-users; +Cc: Roberto A. Foglietta

From: Jan Kiszka <jan.kiszka@siemens.com>

Neither dpkg_do_mounts nor dpkg_undo_mounts are invoked anymore. Drop
them and the whole buildchroot dependency along this.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Changes in v2:
 - drop all traces of buildchroot - it's already dead code

 meta/classes/dpkg-base.bbclass | 28 ----------------------------
 1 file changed, 28 deletions(-)

diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 260aa73e..61bf48ef 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -5,7 +5,6 @@
 # SPDX-License-Identifier: MIT
 
 inherit sbuild
-inherit buildchroot
 inherit debianize
 inherit terminal
 inherit repository
@@ -123,9 +122,6 @@ do_apt_fetch() {
 addtask apt_fetch
 do_apt_fetch[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
 
-# Add dependency from the correct buildchroot: host or target
-do_apt_fetch[depends] += "${BUILDCHROOT_DEP}"
-
 # Add dependency from the correct schroot: host or target
 do_apt_fetch[depends] += "${SCHROOT_DEP}"
 
@@ -188,30 +184,6 @@ addtask prepare_build after do_patch do_transform_template before do_dpkg_build
 do_prepare_build[deptask] = "do_deploy_deb"
 do_prepare_build[depends] = "${SCHROOT_DEP}"
 
-BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
-
-dpkg_do_mounts() {
-    mkdir -p ${BUILDROOT}
-    sudo mount --bind ${WORKDIR} ${BUILDROOT}
-
-    buildchroot_do_mounts
-}
-
-dpkg_undo_mounts() {
-    i=0
-    while ! sudo umount ${BUILDROOT}; do
-        sleep 0.1
-        if [ `expr $i % 100` -eq 0 ] ; then
-            bbwarn "${BUILDROOT}: Couldn't unmount ($i), retrying..."
-        fi
-        if [ $i -ge 10000 ]; then
-            bbfatal "${BUILDROOT}: Couldn't unmount after timeout"
-        fi
-        i=`expr $i + 1`
-    done
-    sudo rmdir ${BUILDROOT}
-}
-
 do_prepare_build_append() {
     # Make a local copy of isar-apt repo that is not affected by other parallel builds
     mkdir -p ${WORKDIR}/isar-apt/${DISTRO}-${DISTRO_ARCH}
-- 
2.35.3

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

* Re: [PATCH v2] dpkg-base: Drop dependency on buildchroot
  2023-01-10  7:55 [PATCH v2] dpkg-base: Drop dependency on buildchroot Jan Kiszka
@ 2023-01-10 19:37 ` Baurzhan Ismagulov
  2023-01-10 21:01   ` Roberto A. Foglietta
  2023-01-11  6:40   ` Jan Kiszka
  2023-01-24  7:37 ` Uladzimir Bely
  1 sibling, 2 replies; 5+ messages in thread
From: Baurzhan Ismagulov @ 2023-01-10 19:37 UTC (permalink / raw)
  To: isar-users; +Cc: Jan Kiszka

On Tue, Jan 10, 2023 at 08:55:25AM +0100, Jan Kiszka wrote:
> Neither dpkg_do_mounts nor dpkg_undo_mounts are invoked anymore. Drop
> them and the whole buildchroot dependency along this.

Yes, we looked at this recently but it was still used in meta-iot2050
npm.bbclass. Would be good if we could drop it here.

With kind regards,
Baurzhan

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

* Re: [PATCH v2] dpkg-base: Drop dependency on buildchroot
  2023-01-10 19:37 ` Baurzhan Ismagulov
@ 2023-01-10 21:01   ` Roberto A. Foglietta
  2023-01-11  6:40   ` Jan Kiszka
  1 sibling, 0 replies; 5+ messages in thread
From: Roberto A. Foglietta @ 2023-01-10 21:01 UTC (permalink / raw)
  To: isar-users, Jan Kiszka

On Tue, 10 Jan 2023 at 20:37, Baurzhan Ismagulov <ibr@radix50.net> wrote:
>
> On Tue, Jan 10, 2023 at 08:55:25AM +0100, Jan Kiszka wrote:
> > Neither dpkg_do_mounts nor dpkg_undo_mounts are invoked anymore. Drop
> > them and the whole buildchroot dependency along this.
>
> Yes, we looked at this recently but it was still used in meta-iot2050
> npm.bbclass. Would be good if we could drop it here.
>

So the correct approach could be this one from Jan

https://patchwork.isar-build.org/project/isar/patch/4a89ddd8-5be1-9aff-ab5c-579ecda50b8f@siemens.com/

those who still need buildroot, will simple insert this in their layer

# Add dependency from the correct buildchroot: host or target
do_apt_fetch[depends] += "${BUILDCHROOT_DEP}"

Everybody else will be free by it, per default.

Does it make sense for you?

Best regards, R-

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

* Re: [PATCH v2] dpkg-base: Drop dependency on buildchroot
  2023-01-10 19:37 ` Baurzhan Ismagulov
  2023-01-10 21:01   ` Roberto A. Foglietta
@ 2023-01-11  6:40   ` Jan Kiszka
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2023-01-11  6:40 UTC (permalink / raw)
  To: isar-users

On 10.01.23 20:37, Baurzhan Ismagulov wrote:
> On Tue, Jan 10, 2023 at 08:55:25AM +0100, Jan Kiszka wrote:
>> Neither dpkg_do_mounts nor dpkg_undo_mounts are invoked anymore. Drop
>> them and the whole buildchroot dependency along this.
> 
> Yes, we looked at this recently but it was still used in meta-iot2050
> npm.bbclass. Would be good if we could drop it here.

I'm responsible for that use case, so you don't need to worry. And as
long as the buildchroot class itself is not yet gone, we could even keep
it alive in its current form a bit longer. But the right step forward is
to create a dedicated chroot in that class for its npm-fetching use
case. We will deal with that downstream.

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


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

* Re: [PATCH v2] dpkg-base: Drop dependency on buildchroot
  2023-01-10  7:55 [PATCH v2] dpkg-base: Drop dependency on buildchroot Jan Kiszka
  2023-01-10 19:37 ` Baurzhan Ismagulov
@ 2023-01-24  7:37 ` Uladzimir Bely
  1 sibling, 0 replies; 5+ messages in thread
From: Uladzimir Bely @ 2023-01-24  7:37 UTC (permalink / raw)
  To: isar-users

In mail from вторник, 10 января 2023 г. 10:55:25 +03 user Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Neither dpkg_do_mounts nor dpkg_undo_mounts are invoked anymore. Drop
> them and the whole buildchroot dependency along this.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
> Changes in v2:
>  - drop all traces of buildchroot - it's already dead code
> 
>  meta/classes/dpkg-base.bbclass | 28 ----------------------------
>  1 file changed, 28 deletions(-)
> 

Applied to next, thanks.




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

end of thread, other threads:[~2023-01-24  7:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10  7:55 [PATCH v2] dpkg-base: Drop dependency on buildchroot Jan Kiszka
2023-01-10 19:37 ` Baurzhan Ismagulov
2023-01-10 21:01   ` Roberto A. Foglietta
2023-01-11  6:40   ` Jan Kiszka
2023-01-24  7:37 ` Uladzimir Bely

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