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