Gentoo Archives: gentoo-user

From: Tom Wijsman <TomWij@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Show ebuild date/time in emerge --pretend output
Date: Sat, 12 Apr 2014 20:35:08
Message-Id: 20140412223412.7fcbe1bb@gentoo.org
In Reply to: Re: [gentoo-user] Show ebuild date/time in emerge --pretend output by Tanstaafl
1 On Sat, 12 Apr 2014 13:44:30 -0400
2 Tanstaafl <tanstaafl@×××××××××××.org> wrote:
3
4 > Last - I merely asked if this was *feasible*.
5
6 It was unclear to me whether this is in the context of it being
7 feasible for (other) users, or whether this is in the context of making
8 it work in Portage; I've not replied earlier because I thought it was
9 in the first context, but I can shed some details on implementation.
10
11 For the releases to the Portage tree; this would have to be deduced
12 from the release lines ChangeLog, as there is no other file that yields
13 details on changes that happened to the package.
14
15 For a demonstration of those release lines:
16
17 $ grep '^*' /usr/portage/sys-kernel/gentoo-sources/ChangeLog | tac
18 ...
19 *gentoo-sources-3.13.9 (04 Apr 2014)
20 *gentoo-sources-3.4.86 (03 Apr 2014)
21 *gentoo-sources-3.10.36 (04 Apr 2014)
22 *gentoo-sources-3.12.16 (04 Apr 2014)
23
24 Stabilizations would be harder, as they require to parse the log
25 messages in the ChangeLog; it is not standardized to be parsed out.
26
27 Portage does have functionality to obtain the ChangeLogs
28 entries between two versions; the -l parameter (--changelog) does that,
29 so, the information is not far away. The implementation might need some
30 specific Portage and Python knowledge though; so, I'd suggest a feature
31 request for one of the Portage developers to look into this. It might
32 work to try to grep those ChangeLog release lines from that output.
33
34 We can however proceed and try to see if we can do this external.
35
36 If you have app-portage/eix, a list of updates is easy to obtain:
37
38 $ eix -Iuc
39 ...
40 [U] media-libs/freetype (2.5.0.1(2)@04/11/2014 ->
41 (~)2.5.3-r1(2)): A high-quality and portable font engine
42 [U] media-plugins/gst-plugins-faac (0.10.23(0.10)@01/31/2013 ->
43 0.10.23(0.10)^t 1.2.3(1.0)^t): plugin for gstreamer
44 [U] media-plugins/gst-plugins-soup (0.10.31(0.10)@12/04/2012 ->
45 0.10.31(0.10)^t 1.2.3(1.0)^t): GStreamer plugin for HTTP client
46 source
47 ...
48
49 We can use this information to write a fast (~1s) bash shell script:
50
51 https://gist.github.com/TomWij/a813e9bf0314007bf0da
52
53 That can produce a list of upgrades and when the ebuilds were released:
54
55 $ bash ./when-released.sh
56 ...
57 *freetype-2.5.3-r1 (16 Mar 2014)
58 *gst-plugins-faac-1.2.3 (01 Mar 2014)
59 *gst-plugins-soup-1.2.3 (16 Feb 2014)
60 ...
61
62 One issue I see though is that it gives back versions of slots in which
63 you have nothing installed; it requires much more logic, unless eix
64 can somehow do this I suppose that logic would be interaction with
65 Portage. And if we go down that road, we might just as well ask for it
66 to be implemented; unless someone knowledgeable can help us further.
67
68 Although besides that problem, it otherwise does work quite well here;
69 if not, feel free to inform and we can try to further improve matching.
70
71 (PS: Yes, it's quite hackish, no shebang, no POSIX compliance; it is
72 meant as an PoC example, further improvements can be done later)
73
74 --
75 With kind regards,
76
77 Tom Wijsman (TomWij)
78 Gentoo Developer
79
80 E-mail address : TomWij@g.o
81 GPG Public Key : 6D34E57D
82 GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D