[releng] find_unblocked_orphans: Rework status_change info

Till Maas till at fedoraproject.org
Sat Nov 1 21:48:56 UTC 2014


commit baefb6458fe613d2b3f1207cd541f3a3d91687d9
Author: Till Maas <opensource at till.name>
Date:   Sat Nov 1 22:47:53 2014 +0100

    find_unblocked_orphans: Rework status_change info

 scripts/find_unblocked_orphans.py |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/scripts/find_unblocked_orphans.py b/scripts/find_unblocked_orphans.py
index 02807c8..2fb6e6c 100755
--- a/scripts/find_unblocked_orphans.py
+++ b/scripts/find_unblocked_orphans.py
@@ -543,10 +543,8 @@ def maintainer_table(packages, pkgdb_dict):
         for p in people:
             affected_people.setdefault(p, set()).add(package_name)
         p = ', '.join(people)
-        status_change = pkginfo.status_change
         age = pkginfo.age
-        agestr = "{} ({} weeks ago)".format(status_change.strftime("%Y-%m-%d"),
-                                            age.days / 7)
+        agestr = "{} weeks ago".format(age.days / 7)
 
         if with_table:
             table.add_row([package_name, p, agestr])
@@ -562,8 +560,12 @@ def dependency_info(dep_map, affected_people, pkgdb_dict):
     info = ""
     for package_name, subdict in dep_map.items():
         if subdict:
-            info += "Depending on: {} ({})\n".format(package_name,
-                                                     len(subdict.keys()))
+            pkginfo = pkgdb_dict[package_name]
+            status_change = pkginfo.status_change.strftime("%Y-%m-%d")
+            age = pkginfo.age.days / 7
+            fmt = "Depending on: {} ({}), status change: {} ({} weeks ago)\n"
+            info += fmt.format(package_name, len(subdict.keys()),
+                               status_change, age)
             for fedora_package, dependent_packages in subdict.items():
                 people = pkgdb_dict[fedora_package].get_people()
                 for p in people:


More information about the rel-eng mailing list