James Bowes

Purveyor of Pre-eminent Programmes

yq: a stack for package transactions

with 2 comments

yq is a little command line program I’ve been coding up over the past week to solve a specific problem I encounter quite regularly. Often I will install a program via yum to try it out, only to decide I don’t like it. The problem occurs when the installed program brings in dependencies; if you want these removed along with the program, you’ll need to remember all of them. So, my frequent testing of programs results in a lot of built-up cruft on my machine.

A solution to this problem are rollbacks. rpm does have built-in rollback support. I am not interested in saving all of the previously installed rpms on my disk when I install or upgrade something new, nor am I interested in saving each and every rpm transaction.

yq leverages yum to perform transaction rollbacks and replays. Since the rpms you are dealing with are already in a yum repository, yq only records the names of these rpms.

The design for yq is influenced by patch management programs like quilt, which is where the stack comes into play. Transactions that you create can be pushed and popped onto/off of the stack, changing the state of your system.

You can download yq, or browse the sources via gitweb.

Advertisements

Written by jbowes

March 24, 2007 at 12:50 pm

Posted in tech

2 Responses

Subscribe to comments with RSS.

  1. Why not use “yum remove “? i.e. yum remove f-spot it will remove any dependencies that aren’t needed by anything else. If they were brought in by f-spot, they will get removed.

    Jesus Rodriguez

    March 30, 2007 at 3:50 pm

  2. > If they were brought in by f-spot, they will get removed.

    No, they won’t.

    Though this is another idea I’ve been kicking around; a plugin that will run down your dep tree when you remove something and pull out anything that’s no longer required. I’m happy with yq for now, since this way I don’t even have to remember the name of any package at all.

    James Bowes

    March 30, 2007 at 4:58 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: