You are not logged in.

#1 2011-08-31 23:18:01

Doorbreath
Member
Registered: 2010-06-08
Posts: 20

Keeping package groups updated

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?

Offline

#2 2011-09-01 03:02:05

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Keeping package groups updated

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:

check_groups.py

#!/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.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2011-09-01 17:56:31

Doorbreath
Member
Registered: 2010-06-08
Posts: 20

Re: Keeping package groups updated

Excellent, thanks a million for this, don't know where I'd be in arch if it wasn't for you!

Offline

#4 2011-10-22 19:26:59

Doorbreath
Member
Registered: 2010-06-08
Posts: 20

Re: Keeping package groups updated

I guess nobody else cares about this issue...

Offline

#5 2011-10-23 01:56:18

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: Keeping package groups updated

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

Offline

#6 2011-10-23 02:23:21

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Keeping package groups updated

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.

Offline

Board footer

Powered by FluxBB