Sort specific category by added date?

Matthew Seaman m.seaman at
Wed Jan 12 03:16:25 PST 2005

Sam Lawrance wrote:
> Scott I. Remick wrote:
>> Is there a way (web-based or command-line) to get a list of all the 
>> ports in
>> a specific category sorted by their added (not modified/updated) date?
>> For example: I want a list of all the games, sorted by those added most
>> recently first.
>> I can't seem to come up with a trick, but then again, I'm not all that
>> skilled (but still learning!)...

> I was going to suggest looking at the "Date created" which is at the top 
> of just about every port Makefile, but there are spelling errors and the 
> format varies a little.
> Something like the following might help. It extracts the date that the 
> first revision of the Makefile was added. You'll need a copy of the 
> ports tree with which you can use 'cvs'. Run it inside a category 
> directory.
> cd /usr/ports/games
> for i in *; do
>    echo -n `cvs log -r1.1 $i/Makefile | grep "date:" | cut -c 7-25`; 
> echo " $i";
> done | sort
> Needs a bit of tweaking, but you get the idea. The output for 'games' is 
> at

Or you could look at the Makefile in /usr/ports/games -- specifically 
the output of 'cvs annotate':

The 'SUBDIR += portname' lines get basically added when the port is 
first committed, so correlating the Makefile version numbers with the 
date that version was created will give you a pretty good answer.  It's 
not perfect -- for instance if the port was renamed it will give you the 
date that happened -- but it's probably a lot quicker than an exhaustive 
search through the whole CVS history for the category.



Dr Matthew J Seaman MA, D.Phil.                       8 Dane Court Manor
                                                       School Rd
PGP:         Tilmanstone
Tel: +44 1304 617253                                  Kent, CT14 0JL UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 372 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-ports mailing list