You are not logged in.
Pages: 1
Hey folks,
is there a possibility to see all programs, i installed directly via pacman, e.g. pacman -S ion? I don't want to see dependencies, libs and so on...
thanks
Offline
Is this what you mean?
pacorphans script
Offline
No, he wants to know which packages have been installed via a pacman call. Like pacman -S vim screen and so on. He does not want to see packages that have been pulled in as a dependency of those.
Todays mistakes are tomorrows catastrophes.
Offline
this is supported by yaourt http://aur.archlinux.org/packages.php?d … hans=&SeB=
Offline
Yeah, yaourt -Qe does. Thanks
Offline
#!/usr/bin/env python
from subprocess import PIPE, Popen
from re import findall
pkglist = findall('(.*) .*\n', Popen(['pacman', '-Q'], stdout=PIPE).stdout.read())
reasons = findall('.*\nInstall Reason : (.*)\n.*', Popen(['pacman', '-Qi']+pkglist, stdout=PIPE).stdout.read())
i = 0
for p in pkglist:
if 'Explicitly installed' in reasons[i]:
print p
i += 1
i was bored so i decided to implement this in python ;; my method prints only the pkglist not the version numbers and is considerably faster ... after the disk cache
0m0.291s vs 0m4.884s
Offline
looks like it works nice thanks.
Offline
yw
Offline
And, how about the content of meta-packages like xorg-fonts-* from xorg? I'd like to see just xorg in that case...
Offline
#!/usr/bin/env python
import sys
from subprocess import PIPE, Popen
from re import findall
pkgnames = findall('(.*) .*\n', Popen(['pacman', '-Q'], stdout=PIPE).stdout.read())
reasons = findall('.*\nInstall Reason : (.*)\n.*', Popen(['pacman', '-Qi']+pkgnames, stdout=PIPE).stdout.read())
pkggroup = dict((p, g) for (g, p) in findall('(.*) (.*)\n', Popen(['pacman', '-Qg'], stdout=PIPE).stdout.read()))
if '-c' in sys.argv[1:]:
pkglist = set(pkggroup.get(p, p) for (p, r) in zip(pkgnames, reasons) if 'Explicitly installed' in r)
else:
pkglist = set(p for (p, r) in zip(pkgnames, reasons) if 'Explicitly installed' in r)
print '\n'.join(pkglist)
looks right .. pass the script the -c arg,, (pmx.py -c) to print the group names instead,, otherwise it acts as it did before
Offline
Pages: 1