auf.kante
Gunnar macht sich selbststaendig und fliegt auf
die Schnauze
wird erfolgreich. Wer mag darf zuschauen.
Gunnar is starting his business. He will certainly
fail succeed. You may watch.
auf.kante
www.flickr.com

Sat, 23 Sep 2006

Doing more with layman (... and layman-1.0.8)

Since dju just asked: Yes, you can use layman as a general repository manager. I've been doing something like that for a while now. I have a second directory in /usr/portage/local that is also managed by layman. It does not contain overlay repositories but the subversion checkout for a specific portage script of mine. I frequently run something like layman -c /etc/script/layman.cfg -S to sync this repository on all Gentoo machines I administrate.

dju specifically wanted to manage the Gentoo tree using layman. To do that you will need to use a separate layman configuration file so that you can define a new storage directory within that config file. If you would add the new checkouts to the regular overlay repositories in /usr/portage/local/layman portage will see them as standard overlays which might not be what you want.

So let's create the config file:

mkdir /etc/gentoo
echo "[MAIN]
config_dir : /etc/gentoo
storage: /usr/portage/local/gentoo
cache: %(storage)s/cache.xml
local_list: %(storage)s/overlays.xml
make_conf: %(storage)s/make.conf
overlays: file:///etc/gentoo/layman-gentoo.xml" > /etc/gentoo/layman.cfg

Okay, now we need the "overlay" definitions:

echo '<?xml version="1.0" ?>
<layman>
  <overlay
      type    = "cvs"
      src     = "wrobel@cvs.gentoo.org:/var/cvsroot"
      subpath =	"gentoo"
      contact = "wrobel@gentoo.org"
      status  = "official"
      name    = "gentoo-web">
    <description>
      The Gentoo web repository.
    </description>
  </overlay>
  <overlay
      type    = "cvs"
      src     = "wrobel@cvs.gentoo.org:/var/cvsroot"
      subpath = "gentoo-x86"
      contact = "wrobel@gentoo.org"
      status  = "official"
      name    = "gentoo-portage">
    <description>
      The Gentoo portage tree.
    </description>
  </overlay>
</layman>' > /etc/gentoo/layman-gentoo.xml

You need your own list here since you cannot use my account for accessing the cvs server. But the principle should be clear.

I reached a weird point when I suddenly realized that layman does not have cvs support. Took five minutes to add it but I would have sworn it was in there. Looks like cvs is far more dead than I imagined since nobody complained about it missing so far. So this means you need to use layman-1.0.8 in order to do the following.

Now it should be possible to get and update the two repositories:

layman -c /etc/gentoo/layman.cfg -a gentoo-web
layman -c /etc/gentoo/layman.cfg -a gentoo-portage

You can then sync them at a later point using layman -c /etc/gentoo/layman.cfg -S.

I do not want to judge if it makes sense to use the overlay manager for handling non-overlay repositories but I leave that to you to decide. I just wanted to point out that it is possible.