fix aur-update showing wrong update number
This commit is contained in:
parent
2d99bce987
commit
f513582d44
1 changed files with 6 additions and 14 deletions
|
@ -1,16 +1,7 @@
|
||||||
"""Check updates for AUR.
|
"""Check updates for AUR.
|
||||||
|
|
||||||
Requires the following packages:
|
Requires the following packages:
|
||||||
* yay (used as default)
|
* yay (https://github.com/Jguer/yay)
|
||||||
|
|
||||||
Note - You can replace yay by changing the "yay -Qum"
|
|
||||||
command for your preferred AUR helper. Few examples:
|
|
||||||
|
|
||||||
paru -Qum
|
|
||||||
pikaur -Qua
|
|
||||||
rua upgrade --printonly
|
|
||||||
trizen -Su --aur --quiet
|
|
||||||
yay -Qum
|
|
||||||
|
|
||||||
contributed by `ishaanbhimwal <https://github.com/ishaanbhimwal>`_ - many thanks!
|
contributed by `ishaanbhimwal <https://github.com/ishaanbhimwal>`_ - many thanks!
|
||||||
"""
|
"""
|
||||||
|
@ -49,12 +40,13 @@ class Module(core.module.Module):
|
||||||
)
|
)
|
||||||
|
|
||||||
if code == 0:
|
if code == 0:
|
||||||
self.__packages = len(result.strip().split("\n"))
|
if result == "":
|
||||||
elif code == 2:
|
|
||||||
self.__packages = 0
|
self.__packages = 0
|
||||||
|
else:
|
||||||
|
self.__packages = len(result.strip().split("\n"))
|
||||||
else:
|
else:
|
||||||
self.__error = True
|
self.__error = True
|
||||||
logging.error("yay -Qum exited with {}: {}".format(code, result))
|
logging.error("aur-update exited with {}: {}".format(code, result))
|
||||||
|
|
||||||
def state(self, widget):
|
def state(self, widget):
|
||||||
if self.__error:
|
if self.__error:
|
||||||
|
|
Loading…
Reference in a new issue