Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2005 11:16:00 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Sam Lawrance <boris@brooknet.com.au>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Sort specific category by added date?
Message-ID:  <41E506F0.2080900@infracaninophile.co.uk>
In-Reply-To: <41E4F97C.5010508@brooknet.com.au>
References:  <20050112074137.7216.qmail@web53605.mail.yahoo.com> <41E4F97C.5010508@brooknet.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig4B93559C163585C064D8EBBD
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

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 http://sam.stral.net/freebsd/games-added-date.txt

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

http://www.freebsd.org/cgi/cvsweb.cgi/ports/games/Makefile?annotate=1.732

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.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       8 Dane Court Manor
                                                       School Rd
PGP: http://www.infracaninophile.co.uk/pgpkey         Tilmanstone
Tel: +44 1304 617253                                  Kent, CT14 0JL UK

--------------enig4B93559C163585C064D8EBBD
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQCVAwUBQeUG9Zr7OpndfbmCAQJNFwP/QfFgu4DaM92OO7++1b/sQ0MfW+93vbIf
pTTRPDArvrnqn1OtJeQecV4nU6c2/yY+eBJ03uL06oCnOp1pX9bZWEzkQqaOCOPa
9Ck99/v+W/wPhKc5eSS8uvF2q1GtYcEl8Q8dP7etyxQBfoOwhS6QbsSnoGfSEDM0
FSjH9jUs01I=
=8oqR
-----END PGP SIGNATURE-----

--------------enig4B93559C163585C064D8EBBD--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41E506F0.2080900>