Pacman Transaction Support Project (PTSP)

Introduction

Sometime in October 2004 i think, I was playing around my with my embeded project, ALE. I needed to build a base system image and my Mawk package was corrupt. To make it worse I wasn't connected to the internet, and was also broke so i couldn't go the the nice neighbourhood cyber cafe.

That said, i realised i had Mawk INSTALLED on my system, and it would be nice if i could some how used my already installed copy to create a package. Now my earlier work with ALE had given me some insight into how pacman works (very transparent stuff), so i got to work. I wrote a quick and dirty script that did just that. I called it unpacman :D

Well, immidietly unpacman worked, i decided to clean it up as a patch to makepkg, and alert the archlinux mailing list. Lots of folks liked it, and Judd (pacman's dad :) and archlinux's founder), gave me an idea that makepkg could be used to implement transaction support.

To cut the long story shorter than i would have loved :), I sat down and started working in my spare time, which i have so little of anyway, and this is the result. I guess if it eventually gets good enuff, it will be included into the main pacman code. Won't that be luvly?

Anyway... head off to the download section to see what's available. Also, there's some basic documentation further down.

Building/Installation

Before installing the new pacman you build, use the new makepkg from the download page, to distill your current pacman installation. You have been warned.

#./makepkg -T pacman -w /path/to/save/package

The above line should produce a pacman package of your current pacman installation in /path/to/save/package. You can always reinstall your pacman with:

#pacman -U /path/to/save/package/pacman-X.X.X-X.pkg.tar.gz

This move will save you from sending me flames :)

You can grab the patch your self, and patch your local pacman tree if you know what you're doing very well. In that case, just do:

#patch -p1 < /path/to/transaction.patch.version

I guess you'll know how to install if you choose this option

If you prefer to build your pacman package the Arch Way. I have a PKGBUILD in the download area. Just overwrite your PKGBUILD and do the usual:

# makepkg

After the package has been created, do a:

#pacman -U pacman-X.X.X-X.pkg.tar.gz

Basic Use

The new things you've added are, an enhanced makepkg (-T), an enhanced pacman (-St,-At,-Ut,-Rt) and a brand new program called transpacman.

makepkg -T distills packages. This simply means that it creates a package from the current snapshot of that package you have installed on your system, with all the file changes grabbed as well.See the makepkg man page for details.

pacman -St, uses makepkg with some nifty tricks, to add basic transaction support to pacman. So if you do a pacman -[S|A|U|R]t pkgname, instead of just a pacman -[S|A|U|R] pkgname, pacman will keep information of this action so it can undo it latter.See the pacman man page for details.

To achieve that undo, you'll use Transpacman. The new script installed. transpacman -l, transpacman -D 1, transpacman -R 1, transpacman -r 1 and transpacman -h are all commands you want to play with.See man page for details.

See the footer if you need to contact me.

Transaction Patch built by Essien Ita Essien [ essiene | at | datavibe | dot | net or essiene | at | gmail | dot | com ]
Arch Linux is a Copyright of Judd Vinet.
Linux is a Copyright of Linus Torvalds.