Commit c296627
committed
Fix update count for dnf4 compatibility
The fix introduced in b24592f for
dnf5 compatibility inherently broke compatibility with dnf4.
While that was fine at the time because sysmotd was only targeting
Fedora versions using dnf5, sysmotd now also targets AlmaLinux after
lolcat became available through the EPEL repository. AlmaLinux 9 and
10 still use dnf4.
So enhance the logic to parse available upgrades to accommodate dnf4
and dnf5 output formats, and also include package installs (e.g.
kernel) in the count.
Signed-off-by: Manuel Fombuena <mfombuena@innovara.tech>1 parent 5189602 commit c296627
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| |||
0 commit comments