|
19 | 19 |
|
20 | 20 | class OutdatedProfilePackage(results.ProfilesResult, results.Warning): |
21 | 21 | """Profile files includes package entry that doesn't exist in the repo |
22 | | - for a mentioned period of time.""" |
| 22 | + for a mentioned period of time. |
| 23 | +
|
| 24 | + This is only reported if the version was removed more than 3 months ago, |
| 25 | + or all versions of this package were removed (i.e. last-rite). |
| 26 | + """ |
23 | 27 |
|
24 | 28 | def __init__(self, path, atom, age): |
25 | 29 | super().__init__() |
@@ -261,9 +265,10 @@ def _report_unknown_atom(self, path, atom): |
261 | 265 | removal = max(x.time for x in matches) |
262 | 266 | removal = datetime.fromtimestamp(removal) |
263 | 267 | years = (self.today - removal).days / 365.2425 |
264 | | - return OutdatedProfilePackage(path, atom, round(years, 2)) |
265 | | - else: |
266 | | - return UnknownProfilePackage(path, atom) |
| 268 | + # show years value if it's greater than 3 month, or if the package was removed |
| 269 | + if years > 0.25 or not self.search_repo.match(atom.unversioned_atom): |
| 270 | + return OutdatedProfilePackage(path, atom, round(years, 2)) |
| 271 | + return UnknownProfilePackage(path, atom) |
267 | 272 |
|
268 | 273 | @verify_files(("parent", "parents"), ("eapi", "eapi")) |
269 | 274 | def _pull_attr(self, *args): |
|
0 commit comments