Informatik und Kram

Da wir lange nicht wußten, wo wir das für die Uni ausgearbeitete Material unterbringen sollten und auch einen schrecklichen Drang hatten der Welt diverse Sachen aufzudrücken...

Python ArchLinux ALPM Library
de-flagge aktiviert en-flagge aktiviert

Creating a Python API for the Pacman - Arch Linux Package Management System was something I had in mind for some time now. The idea was to have an easy and high-level API to the alpm-libraries to simplify and encourage developing of python based applications on top of the Arch Linux Package Management. The article starts with some general topics concerning pyalpmm and the pacman clone mmacman and it ends with a pyalpmm tutorial as a quickstart.

About

There already is a 0.1 Release, but I rather would call this an advanced technical-demo. Many things, which you need for the everyday package-managing work, but I'm quiet sure that there will be several API changes until at least version 0.4, so everybody be warned. Generally it's not possible to damage the system in some way, because libalpm does a good job. But this is GPL software so the usual warning applies: use it at your own risk. But nobody has to be frightened, I use mmacman every day and it even works for all special cases like replacing a package.

Download / Installation

You can download the 0.1 Release and just follow the instructions in the Release 0.1 README and you are ready to go. There is a subversion repository, which I would recommend, as there are a lot of changes at this point:
svn co svn://infolexikon.de/pyalpmm/trunk
The installation of the svn checkout is the same, just check the README. You can also browse through the subversion repository. There are now PKGBUILDS available for the SVN-Version and the Release.

MMacman

MMacman at this point is just a limited pacman clone. mmacman is mainly used as an example application on top of pyalpmm. The screenshot at top of the article is taken after doing some tasks with mmacman. At this point the following is working:
mmacman -S <pkg>
mmacman -Su
mmacman -R <pkg>
mmacman -Ss <search>
mmacman -Qi <pkg>
mmacman -Si <pkg>
mmacman -y     # standalone usable or in combination with any other
mmacman -x     # deletes alpm/pacman db.lck - useful during development
mmacman handles most things like pacman does, just the output - of course - is not the same. Also there is no progress bar (yet). pyalpmm handles them fine and they are nicely wrapped to events, just mmacman is not yet "equipped" with it.

pyalpmm Tutorial

The tutorial is now available at the pyalpmm documents section.

Kommentare

Kommentar schreiben