Is there an easy way to keep track of additions and removals to groups? Is it worth doing? How often do packages get removed from or added to base/xfce/kdebase etc?
I've posted a script somewhere on the forum that could track group changes, but I can't find it right now, so here's a new one:
#!/usr/bin/env python3 import os import subprocess import sys def get_group(group, local=False): if local: op = '-Q' else: op = '-S' try: with open(os.devnull, 'w') as f: return set( subprocess.check_output( ['pacman', op, '-qg', group], stderr=f ).decode().strip().split('\n')) except subprocess.CalledProcessError: return set() for group in sys.argv[1:]: sync_group = get_group(group) local_group = get_group(group, local=True) new = sync_group - local_group old = local_group - sync_group print(group) print('\tnew:\t', ' '.join(sorted(new))) print('\told:\t', ' '.join(sorted(old)))
Invoke it with group names, e.g.
check_groups.py base base-devel lxde
It will print out a list of new group packages that are not installed and old packages that are no longer part of the group.
base new: cronie old: tcp_wrappers base-devel new: old: lxde new: gpicview lxde-common lxde-icon-theme lxdm lxlauncher lxpanel lxrandr lxsession lxtask lxterminal old:
If there's any interest in this, I will rewrite it with pyalpm to improve efficiency.
Excellent, thanks a million for this, don't know where I'd be in arch if it wasn't for you!
I guess nobody else cares about this issue...
I don't know about nobody caring, I've copied Xyne's script and check every once and a while, and appreciate having it available. Just not much too add once such a script is available
I don't think there's much need to improve its efficiency.
I'm using it once in a while + I'm checking what packages go in and out of various repos with my own one-liner.