Even though a recipe might not have a MAINTAINER set, one still might want to upgrade it.
This makes it possible to upgrade said kind of recipes and still keep the stats meaningful by displaying one for all maintainerless recipes. Signed-off-by: Quentin Schulz <[email protected]> --- - RESEND because I was not subscribed to the ML with this address already, - please ignore, resent only for archive purposes on the ML, this patch has been merged already modules/statistics.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/statistics.py b/modules/statistics.py index 323d042..77db151 100644 --- a/modules/statistics.py +++ b/modules/statistics.py @@ -71,8 +71,10 @@ class Statistics(object): stat_msg += " * " + status + ": " + str(list_len) + "\n" for pkg, new_ver, maintainer in self.upgrade_stats[status]: - stat_msg += " " + pkg + ", " + new_ver + ", " + \ - maintainer + "\n" + stat_msg += " " + pkg + ", " + new_ver + if maintainer: + stat_msg += ", " + maintainer + stat_msg += "\n" if self.total_attempted == 0: percent_succeded = 0 @@ -93,7 +95,7 @@ class Statistics(object): for m in self.maintainers: attempted = self.succeeded[m] + self.failed[m] stat_msg += " %s: attempted=%d succeeded=%d(%.2f%%) failed=%d(%.2f%%)\n" % \ - (m.split("@")[0], attempted, self.succeeded[m], + (m.split("@")[0] if m else "Maintainerless", attempted, self.succeeded[m], self.succeeded[m] * 100.0 / attempted, self.failed[m], self.failed[m] * 100.0 / attempted) -- 2.26.2
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#50278): https://lists.yoctoproject.org/g/yocto/message/50278 Mute This Topic: https://lists.yoctoproject.org/mt/76232363/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
