public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Koch, Stefan' via isar-users" <isar-users@googlegroups.com>
To: "isar-users@googlegroups.com" <isar-users@googlegroups.com>,
	"Kiszka, Jan" <jan.kiszka@siemens.com>
Cc: "Schertler, Daniel" <daniel.schertler@siemens.com>,
	"Storm, Christian" <christian.storm@siemens.com>,
	"ubely@ilbers.de" <ubely@ilbers.de>,
	"Becker, Sascha" <becker@siemens.com>,
	"Adler, Michael" <michael.adler@siemens.com>,
	"MOESSBAUER, Felix" <felix.moessbauer@siemens.com>
Subject: Re: [PATCH 1/1] Fix ZeroDivisionError for kernels without modules
Date: Fri, 17 Apr 2026 11:41:11 +0000	[thread overview]
Message-ID: <25311cadb57c30bd18a0af3ad36311d5a8142e29.camel@siemens.com> (raw)
In-Reply-To: <e2051cb4-cc88-43bc-8582-c3a401ac5155@siemens.com>

On Fri, 2026-04-17 at 12:15 +0200, Jan Kiszka wrote:
> On 17.04.26 11:34, Stefan Koch wrote:
> > Ensure that `num_pkgs` is at least 1 to avoid division by zero.
> > 
> > Fixes: 88656cc9 ("generate_initramfs: fix progress reporting on
> > dracut")
> > 
> 
> I think that commit just armed the bug. It was rather introduced by
> 938dab363006529f0b5296dfbc09ef306fc8c3d7.

v2 fixes description
> 
> > Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
> > ---
> >  meta/lib/rootfs_progress.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta/lib/rootfs_progress.py
> > b/meta/lib/rootfs_progress.py
> > index 6feed9df..58d16574 100644
> > --- a/meta/lib/rootfs_progress.py
> > +++ b/meta/lib/rootfs_progress.py
> > @@ -77,7 +77,7 @@ class InitrdProgressHandler(PkgsProgressHandler):
> >          m = re.search(r'^Total number of modules: ([0-9]+)', line)
> >          if m:
> >              # in MODULES=most mode, we install ~half of all
> > modules
> > -            self._num_pkgs = int(m.group(1)) // 2
> > +            self._num_pkgs = max(1, int(m.group(1)) // 2)
> >              self._stage = 'post-prepare'
> >  
> >      def process_line(self, line):
> 
> Jan

-- 
Stefan Koch
Siemens AG
www.siemens.com

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/25311cadb57c30bd18a0af3ad36311d5a8142e29.camel%40siemens.com.

  reply	other threads:[~2026-04-17 11:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17  9:34 [PATCH 0/1] " 'Stefan Koch' via isar-users
2026-04-17  9:34 ` [PATCH 1/1] " 'Stefan Koch' via isar-users
2026-04-17 10:15   ` 'Jan Kiszka' via isar-users
2026-04-17 11:41     ` 'Koch, Stefan' via isar-users [this message]
2026-04-17 11:47       ` 'Koch, Stefan' via isar-users

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25311cadb57c30bd18a0af3ad36311d5a8142e29.camel@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=becker@siemens.com \
    --cc=christian.storm@siemens.com \
    --cc=daniel.schertler@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=michael.adler@siemens.com \
    --cc=stefan-koch@siemens.com \
    --cc=ubely@ilbers.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox