image class bugfix: interuption does not break the rebuild

Message ID 20230105192012.2761557-1-roberto.foglietta@linuxteam.org
State Rejected, archived
Headers show
Series image class bugfix: interuption does not break the rebuild | expand

Commit Message

roberto.foglietta@linuxteam.org Jan. 5, 2023, 7:20 p.m. UTC
From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>

image class bugfix: interuption does not break the rebuild

Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
 meta/classes/image.bbclass | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Henning Schild Jan. 5, 2023, 8:14 p.m. UTC | #1
Was this sent twice or do you want to include a changelog to the v1?

This looks again like it is in merge conflict of ongoing work by me,
please note that somewhere to help maintainers resolve the conflict and
tell me if you want to take over here.

In which case you can, but give me a Reported-by if you want

Am Thu,  5 Jan 2023 20:20:12 +0100
schrieb roberto.foglietta@linuxteam.org:

> From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
> 
> image class bugfix: interuption does not break the rebuild

Not sure i would understand that, but also not sure my commit message
was any better.

Henning

> 
> Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
> ---
>  meta/classes/image.bbclass | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index d72b8fa..b04826b 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -428,10 +428,11 @@ do_rootfs_finalize() {
>          rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list"
>          rm -f "${ROOTFSDIR}/etc/apt/apt.conf.d/50isar"
>  
> -        mv "${ROOTFSDIR}/etc/apt/sources-list" \
> -            "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
> -
> -        rm -f "${ROOTFSDIR}/etc/apt/sources-list"
> +        if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ]; then
> +            mv  "${ROOTFSDIR}/etc/apt/sources-list" \
> +                "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
> || :
> +            rm  "${ROOTFSDIR}/etc/apt/sources-list" -f
> +        fi
>  
>  	BTROOTFS="${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-target"
>  	for i in $(ls -1d ${BTROOTFS}/*/rootfs/ 2>/dev/null ||
> true); do
Roberto A. Foglietta Jan. 5, 2023, 9:06 p.m. UTC | #2
On Thu, 5 Jan 2023 at 21:14, Henning Schild <henning.schild@siemens.com> wrote:
>
> Was this sent twice or do you want to include a changelog to the v1?

I have tried two with different "from" field - the first one starts to
upset google. Everytime I found a zero day weakness, they fixed it in
24h. *sigh*

The first, I sent is tagged as SPAM in gmail but it pass the checks
with groups - possibly the fix has not applied on all the systems /
divisions.

>
> This looks again like it is in merge conflict of ongoing work by me,
> please note that somewhere to help maintainers resolve the conflict and
> tell me if you want to take over here.

Tomorrow, I am going to produce one with mv -f based on next - so no
conflicts will arise but I need some time to check how -f influences
the building.

Bests, -R

Patch

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index d72b8fa..b04826b 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -428,10 +428,11 @@  do_rootfs_finalize() {
         rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list"
         rm -f "${ROOTFSDIR}/etc/apt/apt.conf.d/50isar"
 
-        mv "${ROOTFSDIR}/etc/apt/sources-list" \
-            "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
-
-        rm -f "${ROOTFSDIR}/etc/apt/sources-list"
+        if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ]; then
+            mv  "${ROOTFSDIR}/etc/apt/sources-list" \
+                "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list" || :
+            rm  "${ROOTFSDIR}/etc/apt/sources-list" -f
+        fi
 
 	BTROOTFS="${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-target"
 	for i in $(ls -1d ${BTROOTFS}/*/rootfs/ 2>/dev/null || true); do