Gentoo Archives: gentoo-dev

From: Bernd Steinhauser <gentoo@×××××××××××××××××.de>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: scm eclasses/ebuilds and revision logging
Date: Sat, 12 Jan 2008 23:21:00
Message-Id: 47894B52.4000303@bernd-steinhauser.de
In Reply to: [gentoo-dev] Re: scm eclasses/ebuilds and revision logging by Ryan Hill
1 Ryan Hill schrieb:
2 > Bernd Steinhauser wrote:
3 >> I'm aware of the fact, that the revision of the currently installed
4 >> package is part of the environment and that is saved, but I'm not only
5 >> interested in the revision of the currently installed version, but also
6 >> in the revision of the previously installed version. Just wanted to
7 >> emphasize that again. ;)
8 >>
9 >> Hope someone comes up with some good ideas. ;)
10 >
11 > Would something like this work for you?
12 >
13 > pkg_preinst() {
14 > local pkgdate=$(date "+%Y%m%d %H:%M:%S")
15 > subversion_wc_info
16 > if [[ -n ${PORT_SCMDIR} ]]; then
17 > [[ -e ${ROOT}/${PORT_SCMDIR}/${PN}.revision ]] \
18 > && cp "${ROOT}/${PORT_SCMDIR}"/${PN}.revision "${T}"
19 > echo "${pkgdate} - ${P} was merged at revision
20 > ${ESVN_WC_REVISION}" \
21 > >> "${T}"/${PN}.revision
22 > insinto "${PORT_SCMDIR}"
23 > doins "${T}"/${PN}.revision
24 > fi
25 > }
26 >
27 > that's for subversion of course. set PORT_SCMDIR in make.conf.
28 >
29 >
30
31 This is sort of what I thought of (of course you brought it into
32 detail), but I didn't know if there is maybe a better way, or if there
33 is actually a way to do this after the installation and not in preinst.
34 But I guess if nobody comes up with something better this is the way to
35 do it.
36 Maybe sth. like elog, just you don't log a message to summary.log, but
37 you log the revision of the package.
38 (Meaning, that you can use elog in every phase of an ebuild.)
39
40 Bernd
41 --
42 gentoo-dev@l.g.o mailing list