Hi reader -
At 2005-12-22, 11:37:35 you wrote:
>Neil Bothwick <[EMAIL PROTECTED]> writes:
>
>> On Fri, 23 Dec 2005 00:22:24 +0930, Iain Buchanan wrote:
>>
>>> > find /var/db/pkg -name '*.ebuild' !
>>> > -newer /var/db/pkg/sys-devel/gcc-3.4.4-r1/gcc-3.4.*
>>> >
>>> > to find all packages compiled before your last compiler update.
>>>
>>> There's also app-portage/genlop, quite nice for doing various things:
>>
>> genlop is really nice, I use it all the time, but I don't think it has an
>> option to find all packages installed after a particular package. It
>> would be a nice variation on the --date option.
>
>Isn't the output in chrono order?
>
This is exactly why I wrote 'echanges' perl script:
I have a small perl script, 'echanges', that determines the latest
timestamp for installed packages; I find it very helpful to determine
what my daily cron of 'emerge -uD world' has done. I will post it
here if there is any interest;
The manual page follows:
NAME
echanges - display the timestamp for installed Gentoo packages.
SYNOPSIS
echanges [options]
options:
--help | -? this page ( ddduuuuhhhh ).
--man complete man page.
--since=dt | -s dt packages since dt[yesterday,<nbr>{h|d|w|y}]
[DEFAULT: all].
--time | -t sort descending by timestamp [DEFAULT].
--reverse | -r reverse the sort order.
--progress | -p print progress to STDERR.
examples:
# display timestamps for all installed packages in descending
# order by timestamp:
$ echanges
# display timestamps for packages installed/updated since yesterday
# in ascending order by timestamp with a progress hint:
$ echanges --since=yesterday --time --reverse --progress
# display timestamps for packages installed/updated since two days ago
# in descending order by package name:
$ echanges -rns 2d
# to see the complete manual:
$ echanges --man
DESCRIPTION
echanges tracks the latest Gentoo package installs/updates. I find it
very helpful in knowing when I should restart my user sessions ( after a
kde update ), compile the kernel and reboot ( after new kernel sources
), and when to run *etc-update*, among other uses.
Internally, this perl script issues equerys ( *equery* in *gentoolkit*
). First a list of all installed packages is obtained with:
equery -C list
Next, for each package installed, the following equery is issued:
equery -C files --timestamp --filter=obj <package-name>
This list is processed to get the timestamp of the most recent file and
associate that timestamp with the package.
Finally, the list of packages with timestamps is filtered according to
the options passed ( see "OPTIONS" below ) and displayed.
OPTIONS
--since=time -or- -s time
Only display packages since 'time', where time can be one of:
yesterday
24 hours ago.
<number>h
'number' hours ago.
<number>d
'number' days ago.
<number>w
'number' weeks ago.
<number>m
'number' months ( 30 days ) ago.
<number>y
'number' years ago.
DEFAULT:
All packages selected.
--time -or- -t
Sorts in descending order by timestamp [DEFAULT].
--name -or- -n
Sorts in ascending order by package name.
--reverse -or- -r
Reverses the sort selected.
--progress | -p
Print progress ( currently processing package ) to STDERR.
*echanges* can take a long time on slower systems with many packages
installed; use --progress if you need assurance that all is well.
REQUIRES
Gentoo Linux with the *gentoolkit* installed:
emerge gentoolkit
SEE ALSO
Gentoo documentation and *equery* documentation in the *gentoolkit*.
AUTHOR
Beau E. Cox, <[EMAIL PROTECTED]>
COPYRIGHT AND LICENSE
Copyright (C) 2005-2006 by Beau E. Cox
This script is free software; you can redistribute it and/or modify it
under the same terms as Perl itself, either Perl version 5.8.7 or, at
your option, any later version of Perl 5 you may have available.
Aloha => Beau;
[EMAIL PROTECTED]
2005-12-22
--
[email protected] mailing list