You are not logged in.
I was getting annoyed by having some AUR packages installed which are out of date, and maybe were so for some time. So I wanted to find all out-of-date packages so I can bug the maintainer and maybe overtake the package if they don't care.
Since there didn't seem to be a finished solution, I did something quick myself, in python. Figured it might be useful for other people. It needs python-requests.
#!/usr/bin/python
# by: Florian Bruhin (The Compiler) <aurood@the-compiler.org>
# I hereby place this code in the public domain.
import subprocess
import requests
out = subprocess.check_output(['pacman', '-Qm'], universal_newlines=True)
pkgs = [pkg.split()[0] for pkg in out.split('\n') if pkg]
payload = {'type': 'multiinfo', 'arg[]': pkgs}
json = requests.get('https://aur.archlinux.org/rpc.php', params=payload).json()
for result in json['results']:
if result['OutOfDate']:
print(result['Name'])
>>> from __future__ import braces
File "<stdin>", line 1
SyntaxError: not a chance
Offline
Nice one! Thank you.
Offline
How is this different from cower?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
How is this different from cower?
I'll answer to that with another question: How can cower do what this does?
Maybe it can do the same thing indeed, but I didn't find any way.
My script doesn't check which packages are newer on AUR than installed locally (that's what AUR helpers are for), it checks if any package installed locally is marked as "out of date" in the AUR. Basically like aurphan just for out of date instead of orphaned.
>>> from __future__ import braces
File "<stdin>", line 1
SyntaxError: not a chance
Offline
You can do
cower -i --format "%n %t\n" $(pacman -Qqm) | awk '/ yes/ {print $1}'
but it's slower than aurood.
I'm not sure what '--no-ignore-ood' does:
--no-ignore-ood
The reverse of --ignore-ood.-o, --ignore-ood
Ignore all results marked as out of date.
Offline
Very nice, added it to my ~/bin
If you have a very large amount of AUR packages (>100) you might run into some limitation for the url length. Consider splitting the pkgs-list into smaller chunks. Also use "-Qqm", which gives cleaner pacman output and removes some splitting from your python code.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline