Commit cb93a96
committed
context: print metadata cache age after loading repos
DNF4 displayed "Last metadata expiration check: H:MM:SS ago on <date>."
after loading repository metadata. DNF5 dropped this output, making it
hard for users to know whether they are working with stale repo data.
Restore the behaviour by iterating over enabled non-system repos after
load_repos() completes. Show the oldest cache age (most stale repo)
paired with the newest repomd primary timestamp, matching dnf4 logic.
Use libdnf5::utils::sformat for the translated output string.
The message is suppressed when no repos have valid timestamps (e.g.
all repos were just refreshed from the network and have age 0, or no
cache exists yet).
Closes: #1491
Signed-off-by: Devesh B <98201065+DeveshB-1@users.noreply.github.com>1 parent 24b7122 commit cb93a96
1 file changed
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
263 | 267 | | |
264 | 268 | | |
265 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
266 | 309 | | |
267 | 310 | | |
268 | 311 | | |
| |||
1197 | 1240 | | |
1198 | 1241 | | |
1199 | 1242 | | |
| 1243 | + | |
0 commit comments