From 9631d61de70e500bd2a2c180f3a9f7329682efa2 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Jun 10 2021 12:40:12 +0000 Subject: backend: skip chroot directories ending with .cfg Per review in #1739. --- diff --git a/backend/run/copr-backend-analyze-results b/backend/run/copr-backend-analyze-results index dd2b4d5..78d769b 100755 --- a/backend/run/copr-backend-analyze-results +++ b/backend/run/copr-backend-analyze-results @@ -214,10 +214,18 @@ def _main(arguments): if len(parts) == 3: chroot = parts[-1] - distro = "-".join(parts[:-1]) - chroots.add(chroot, kbytes) - - if chroot not in ["srpm-builds", "modules", "repodata"]: + if chroot.endswith(".cfg"): + # some buggy directories, skip them all + pass + elif chroot in ["repodata"]: + # buggy repodata on wrong level + pass + elif chroot in ["srpm-builds", "modules"]: + # We calculate those as chroots, as it is interesting to see + # how much storage the srpm-builds or modules eat. + chroots.add(chroot, kbytes) + else: + chroots.add(chroot, kbytes) distro, arch = chroot.rsplit("-", 1) arches.add(arch, kbytes) distros.add(distro, kbytes)