Gentoo Archives: gentoo-dev

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