1 |
Hi reader - |
2 |
|
3 |
At 2005-12-22, 11:37:35 you wrote: |
4 |
>Neil Bothwick <neil@××××××××××.uk> writes: |
5 |
> |
6 |
>> On Fri, 23 Dec 2005 00:22:24 +0930, Iain Buchanan wrote: |
7 |
>> |
8 |
>>> > find /var/db/pkg -name '*.ebuild' ! |
9 |
>>> > -newer /var/db/pkg/sys-devel/gcc-3.4.4-r1/gcc-3.4.* |
10 |
>>> > |
11 |
>>> > to find all packages compiled before your last compiler update. |
12 |
>>> |
13 |
>>> There's also app-portage/genlop, quite nice for doing various things: |
14 |
>> |
15 |
>> genlop is really nice, I use it all the time, but I don't think it has an |
16 |
>> option to find all packages installed after a particular package. It |
17 |
>> would be a nice variation on the --date option. |
18 |
> |
19 |
>Isn't the output in chrono order? |
20 |
> |
21 |
|
22 |
This is exactly why I wrote 'echanges' perl script: |
23 |
|
24 |
I have a small perl script, 'echanges', that determines the latest |
25 |
timestamp for installed packages; I find it very helpful to determine |
26 |
what my daily cron of 'emerge -uD world' has done. I will post it |
27 |
here if there is any interest; |
28 |
|
29 |
The manual page follows: |
30 |
|
31 |
NAME |
32 |
echanges - display the timestamp for installed Gentoo packages. |
33 |
|
34 |
SYNOPSIS |
35 |
echanges [options] |
36 |
|
37 |
options: |
38 |
--help | -? this page ( ddduuuuhhhh ). |
39 |
--man complete man page. |
40 |
--since=dt | -s dt packages since dt[yesterday,<nbr>{h|d|w|y}] |
41 |
[DEFAULT: all]. |
42 |
--time | -t sort descending by timestamp [DEFAULT]. |
43 |
--reverse | -r reverse the sort order. |
44 |
--progress | -p print progress to STDERR. |
45 |
|
46 |
examples: |
47 |
# display timestamps for all installed packages in descending |
48 |
# order by timestamp: |
49 |
$ echanges |
50 |
|
51 |
# display timestamps for packages installed/updated since yesterday |
52 |
# in ascending order by timestamp with a progress hint: |
53 |
$ echanges --since=yesterday --time --reverse --progress |
54 |
|
55 |
# display timestamps for packages installed/updated since two days ago |
56 |
# in descending order by package name: |
57 |
$ echanges -rns 2d |
58 |
|
59 |
# to see the complete manual: |
60 |
$ echanges --man |
61 |
|
62 |
DESCRIPTION |
63 |
echanges tracks the latest Gentoo package installs/updates. I find it |
64 |
very helpful in knowing when I should restart my user sessions ( after a |
65 |
kde update ), compile the kernel and reboot ( after new kernel sources |
66 |
), and when to run *etc-update*, among other uses. |
67 |
|
68 |
Internally, this perl script issues equerys ( *equery* in *gentoolkit* |
69 |
). First a list of all installed packages is obtained with: |
70 |
|
71 |
equery -C list |
72 |
|
73 |
Next, for each package installed, the following equery is issued: |
74 |
|
75 |
equery -C files --timestamp --filter=obj <package-name> |
76 |
|
77 |
This list is processed to get the timestamp of the most recent file and |
78 |
associate that timestamp with the package. |
79 |
|
80 |
Finally, the list of packages with timestamps is filtered according to |
81 |
the options passed ( see "OPTIONS" below ) and displayed. |
82 |
|
83 |
OPTIONS |
84 |
--since=time -or- -s time |
85 |
Only display packages since 'time', where time can be one of: |
86 |
|
87 |
yesterday |
88 |
24 hours ago. |
89 |
|
90 |
<number>h |
91 |
'number' hours ago. |
92 |
|
93 |
<number>d |
94 |
'number' days ago. |
95 |
|
96 |
<number>w |
97 |
'number' weeks ago. |
98 |
|
99 |
<number>m |
100 |
'number' months ( 30 days ) ago. |
101 |
|
102 |
<number>y |
103 |
'number' years ago. |
104 |
|
105 |
DEFAULT: |
106 |
All packages selected. |
107 |
|
108 |
--time -or- -t |
109 |
Sorts in descending order by timestamp [DEFAULT]. |
110 |
|
111 |
--name -or- -n |
112 |
Sorts in ascending order by package name. |
113 |
|
114 |
--reverse -or- -r |
115 |
Reverses the sort selected. |
116 |
|
117 |
--progress | -p |
118 |
Print progress ( currently processing package ) to STDERR. |
119 |
*echanges* can take a long time on slower systems with many packages |
120 |
installed; use --progress if you need assurance that all is well. |
121 |
|
122 |
REQUIRES |
123 |
Gentoo Linux with the *gentoolkit* installed: |
124 |
|
125 |
emerge gentoolkit |
126 |
|
127 |
SEE ALSO |
128 |
Gentoo documentation and *equery* documentation in the *gentoolkit*. |
129 |
|
130 |
AUTHOR |
131 |
Beau E. Cox, <beaucox@×××××××××.com> |
132 |
|
133 |
COPYRIGHT AND LICENSE |
134 |
Copyright (C) 2005-2006 by Beau E. Cox |
135 |
|
136 |
This script is free software; you can redistribute it and/or modify it |
137 |
under the same terms as Perl itself, either Perl version 5.8.7 or, at |
138 |
your option, any later version of Perl 5 you may have available. |
139 |
|
140 |
|
141 |
Aloha => Beau; |
142 |
beaucox@×××××××××.com |
143 |
2005-12-22 |
144 |
|
145 |
|
146 |
-- |
147 |
gentoo-user@g.o mailing list |