Gentoo Archives: gentoo-dev

From: Avuton Olrich <avuton@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] scm eclasses/ebuilds and revision logging
Date: Sat, 12 Jan 2008 03:58:45
Message-Id: 3aa654a40801111958r3d17531fqc524c4cca536bfa2@mail.gmail.com
In Reply to: [gentoo-dev] scm eclasses/ebuilds and revision logging by Bernd Steinhauser
1 On 1/11/08, Bernd Steinhauser <gentoo@×××××××××××××××××.de> wrote:
2 > Hi,
3 >
4 > this is sth. that has been brought up in the KDE4 forums thread and on
5 > irc. The thing is, that if you're using a live ebuild you might very
6 > likely run into bugs, that have been introduced in a newer revision.
7 > Now when you get in touch with upstream about that bug it might be very
8 > useful if you can tell them, that you know, that a specific version in
9 > the past worked. The idea was now to add the ability to the scm eclasses
10 > to do this automatically.
11 > So after installation then sth. like this
12 > ${CAT}/${P} merged at revision (or commit) ${REVISION}
13 > to a file like /var/log/portage/scm.log.
14 > Now I'm sure there are a few dirty ways to achieve this, but I wonder if
15 > there is an easy and clean way to do this?
16 >
17 > The problem is (I think so), that you can't just write sth. to / because
18 > of the sandbox, so there needs to be a way to get around that, and it
19 > should also happen after installation (post_inst).
20 >
21 > Now if anyone wonders if this might even be useful for the distributed
22 > scm's, I do think so. Because of course if you merge sth. from another
23 > tree, or your ebuild repo_uri fetches from a local dir, then you might
24 > have _other_ commit hashes than upstream, but at least you can then look
25 > into your own repo and tell them, when that was and what happened since
26 > then.
27 >
28 > I'm aware of the fact, that the revision of the currently installed
29 > package is part of the environment and that is saved, but I'm not only
30 > interested in the revision of the currently installed version, but also
31 > in the revision of the previously installed version. Just wanted to
32 > emphasize that again. ;)
33
34 update-live-ebuilds[1] already stores scm x's 'cookie' (hash,
35 revision, whatever). CVS and TLA are the only two which don't have a
36 specific cookie that changes in the local directory, so sha1sum is
37 used on a file that is known to change with repository changes, thus
38 they are not a good target for this.
39
40 Cookie values and the emerging epoch are stored in a uniform manner,
41 in /var/db/ule/*, and since ULE is bash even a caveman could add
42 logging stuff to it cleanly.
43
44 I would suspect anyone who uses live ebuilds on a routine basis should
45 already know about ULE and be using it. Please excuse me if this
46 method considered 'dirty', or offtopic, it was not meant to be.
47 Patches and criticism welcome.
48
49 [1]http://forums.gentoo.org/viewtopic-t-518701.html
50 http://repo.or.cz/w/ule.git
51 --
52 avuton
53 --
54 Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
55 --
56 gentoo-dev@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] scm eclasses/ebuilds and revision logging Bernd Steinhauser <gentoo@×××××××××××××××××.de>