You are not logged in.

#1 2010-11-26 00:18:45

Zerathidune
Member
Registered: 2007-02-25
Posts: 102

pacsync: manage packages with a holistic view of the system

Hey everyone,

I've written a light pacman wrapper that allows the user to manage packages from a perspective of "what should be on the system" rather than haphazardly installing/removing packages as needs change.

It works by allowing the user to define "sets" of packages, which are conceptually similar to groups, except that they are user defined rather than being something in the package repository, and that they are more powerful; in addition to regular packages, they can also contain groups, other sets, or portions thereof. One set is special: the world set is the set of packages that should be explicitly installed. When pacsync is run, it updates everything according to the current package database, then adjusts the set of packages actually on the system to match the world set plus any dependencies, removing any packages that don't need to be on the system for those packages.

The configuration takes place in files in /etc/pacsync (though an environment variable - PACSYNC_CONF can change this directory). each set has two configuration files, setname.set and setname.mask. each of these has a series of rules in it, one on each line. a rule starting with '<' includes another set. a rule starting with '@' includes a group. any other rule includes an individual package. The set as a whole is the set of all packages that are included (directly or indirectly) in setname.set, but not in setname.mask

All of this, plus some examples, are included in the man page.

pacsync obviates the need for metapackages, since you can simply specify that a group should be installed, and if the packages in the group changes, pacsync will adjust. The original motivation however, was organization; I find after I've had a system installed for a while, there are a decent number of packages I no longer need floating around on the system. pacsync allows one to specify an 'experimental' set for all those packages you just want to try out, or sets of packages needed for specific reasons, which may or may not be relevant in the future. The hope is that this will help keep the cruft off of the system.

AUR package:

http://aur.archlinux.org/packages.php?ID=43903

Last edited by Zerathidune (2010-11-26 02:53:10)

Offline

#2 2010-11-26 01:50:26

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: pacsync: manage packages with a holistic view of the system

Not sure if I'd use it myself, but sounds interesting. I think you meant 'holistic', btw.

Offline

#3 2010-11-26 02:55:17

Zerathidune
Member
Registered: 2007-02-25
Posts: 102

Re: pacsync: manage packages with a holistic view of the system

Good catch on the spelling, fixed it here. will probably wait until I have actual code changes to adjust the AUR package.

Offline

#4 2010-12-09 16:00:44

mrbrich
Member
Registered: 2010-04-24
Posts: 42

Re: pacsync: manage packages with a holistic view of the system

This seems like a great idea, and sounds just like something I was wishing for but didn't have the courage to try to implement myself.  Is it working well?  I think I'm going to try it out.  Thanks.

Offline

#5 2010-12-10 23:18:44

Zerathidune
Member
Registered: 2007-02-25
Posts: 102

Re: pacsync: manage packages with a holistic view of the system

Glad you like the idea. It seems to be doing it's job; I haven't encountered any unexpected hiccups since I released it. I'm sure there are improvements to be made though.

The implementation was actually relatively simple. it's written in bash, have a look if you like. Let me know what you think.

Something I've discovered since using it: I suggested previously that one could create an experimental group for stuff you're just trying out to keep track of things. An alternative, which I've been using, is to just bypass pacsync and use pacman -S to install something just to give it a whirl. This way, if you haven't committed to keeping it by the next time you run pacsync, it will be removed automatically.

Offline

#6 2011-04-07 00:12:57

Digit
Member
Registered: 2008-04-28
Posts: 71

Re: pacsync: manage packages with a holistic view of the system

thoroughly thoroughly worthy.

aughta be core.


fave quote of the mo': "Man's reach should exceed his grasp, else what's a heaven for." - Robert Browning

Offline

#7 2011-04-07 08:55:48

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: pacsync: manage packages with a holistic view of the system

I'm toying with the idea of trying this out... I had a look at the code to understand it properly, and found it to be very elegantly coded IMHO (just as a side note!) smile

Offline

#8 2011-08-27 22:03:34

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: pacsync: manage packages with a holistic view of the system

Wow.. this application is amazing, really! Very simple to set up and it works great! Thank you for this, Zerathidune!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

Board footer

Powered by FluxBB