[arch] Pacman Transaction Support
Essien Ita Essien
essiene at datavibe.net
Wed Dec 1 18:14:37 EST 2004
Hi fellas,
I've put together a very rudimentary support for transaction into
pacman. http://www.datavibe.net/~essiene/pacman for more details
I tried attaching the PKGBUILD and Patch here, turned out to be too big,
so i'll only attach the PKGBUILD. Everything is available on the project
site as i've given the link above.
Currently it only works on -S (synchronizing) not support for -A, -U or
-R for now. But its a complete loop that works end to end.
#pacman -St aumix {note the extra t sub option to -S}
(this will install/upgrade aumix, but save a transaction detail in
/var/cache/pacman/trans/{transaction-name} - the scheme is as
transparent as possible. look in the .TRANSINFO file for details.
#transpacman -l (will list all available transactions)
#transpacman -D [name] (will describe what happened in that transaction.
use -D 1 as a special case for the last transaction)
#transpacman -R [name] (will describe what will happen IF we're to
perform a role back to the named transaction)
#transpacman -r [name] (will actually roll back to the named transaction.
[name] can be replaced with 1 as a special case for the last
transaction. (that's a one, not an el :) )
There's still a lot of work to be done, but this works, and i'm already
using it on my system. Ofcourse you DON'T have to, but i'll appreciate
early testers trying it out, with lots of feedback and suggestions, so
we can get it rugged and ready.
Also, I have been playing with the new language D
(http://www.digitalmars.com/d), i've built a package for it, and i'm
using it on my system. Anyone want the PKGBUILD can let me know. I wish
(ohhh how i wisssh) I would be doing this transaction patch, and future
system programming in D. I'm going to try to build gcc with D support,
or the official gcc guys might want to take a look at it. That project
is called gdc. Okay... this mail is already too long.
Cheers
-------------- next part --------------
# $Id: PKGBUILD,v 1.102 2004/09/25 18:06:36 judd Exp $
# Maintainer: judd <jvinet at zeroflux.org>
pkgname=pacman
pkgver=2.9.2
pkgrel=1
pkgdesc="A .tar.gz based package manager with dependency support"
url="http://www.archlinux.org/pacman"
backup=('etc/pacman.conf' 'etc/makepkg.conf' 'etc/abs/abs.conf' \
etc/pacman.d/{current,release,extra,unstable})
makedepends=('libtar')
install=pacman.install
source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz \
http://www.archlinux.org/pacman/sortmirrors.pl \
supfile.arch supfile.extra supfile.unstable abs abs.conf \
current release extra unstable http://www.datavibe.net/~essiene/pacman/downloads/transaction.patch.v04)
md5sums=('f73ed0d84573dfc8fdab541ce55447bd' '005d82a4832b5273450e556f30010414'\
'2c564a8760ec0dac96082f1855d153d1' 'f83885f6c431e4e7f8b131fe444ac0d2'\
'9a44663da93a07c8df42741ea0e41930' '0025f9f786d50201951fc7444207a089'\
'5dfcce0aa5e121936c002e555d6fb55e' '3d6287d2892d541168ec288bdeb66d81'\
'82a317a88a041729ca3887e1b3dcfa8c' '0fa3c4c249ff1f97c90977f86687bb40'\
'082c25bc59de91a366de4768babc01ad' 'b6408dcf026b750e7e945b35078fac75')
build() {
cd $startdir/src/$pkgname-$pkgver
patch -p1 < ../transaction.patch.v04
./configure --prefix=/usr
make || return 1
make DESTDIR=$startdir/pkg install
mkdir -p $startdir/pkg/var/abs/local
install -D -m755 ../sortmirrors.pl $startdir/pkg/usr/bin/sortmirrors.pl
install -D -m755 ../abs $startdir/pkg/usr/bin/abs
install -D -m644 ../abs.conf $startdir/pkg/etc/abs/abs.conf
for fn in supfile.{arch,extra,unstable}; do
install -D -m644 ../$fn $startdir/pkg/etc/abs/$fn
done
for fn in current release extra unstable; do
install -D -m644 ../$fn $startdir/pkg/etc/pacman.d/$fn
done
sed -i "s|i686|$CARCH|g" $startdir/pkg/etc/pacman.d/*
}
More information about the arch
mailing list