From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j3RKP2ee007003 for ; Wed, 27 Apr 2005 20:25:03 GMT Received: from adsl-67-39-48-198.dsl.milwwi.ameritech.net ([67.39.48.198] helo=exodus) by smtp.gentoo.org with esmtpa (Exim 4.43) id 1DQt5q-0006RZ-Vu for gentoo-dev@lists.gentoo.org; Wed, 27 Apr 2005 20:25:11 +0000 Date: Wed, 27 Apr 2005 15:25:48 -0500 From: Brian Harring To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] why do different ebuilds have the same version number? Message-ID: <20050427202548.GP29554@exodus.wit.org> References: <20050427130938.GG20252@ulric.rafique.org> <1114624384.32128.232858999@webmail.messagingengine.com> <426FE55A.7060404@pnpitalia.it> <20050427194113.GN29554@exodus.wit.org> <426FEFD3.3080204@pnpitalia.it> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZJcv+A0YCCLh2VIg" Content-Disposition: inline In-Reply-To: <426FEFD3.3080204@pnpitalia.it> User-Agent: Mutt/1.5.8i X-Archives-Salt: 641e6ae0-a12e-4055-8782-f08452351a2f X-Archives-Hash: 020c01e368d64e482b446ebce462fe2b --ZJcv+A0YCCLh2VIg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 27, 2005 at 10:02:27PM +0200, Francesco Riosa wrote: > Brian Harring wrote: >=20 > >>>[snip] > >>> =20 > >>> > >>Why you could not use ctime/mtime ? Isn't possible to make a check like > >>you do now but only on a filtered by "mtime" list of ebuild ? > >>A command like this > >># find . -name "*.ebuild" -and -mtime "-7" -or -ctime "-7" > >> =20 > >> > >Actually... nope. :) > >You're forgetting about eclass changes, which can adjust metadata=20 > >(deps) of an ebuild w/out the ebuild ever being modified... > >~brian > > =20 > > > right was forgotting that :P , what about something like this ? >=20 > HAS_MODIFIED_ECLASS=3D$( find /usr/portage/eclass/ -name "*.eclass" -and > -ctime "-1" -mtime "-1" ) > if [[ -z $HAS_MODIFIED_ECLASS ]] ; then > echo "Good, using faster method" =20 > find /usr/portage -name "*.ebuild" \ > -and -mtime "-1" \ > -or -ctime "-1" \ > -exec something_here.sh > else > find /usr/portage -name "*.ebuild" \ > -exec something_here.sh > fi >=20 > will save you often, eclasses are not so frequently updated ;-) Actually... :) bit easier, abusing portage's own functionality. python -c $' import portage, time target=3Dlong(time.strftime("%s",time.gmtime())) - 24*60*60 pdb=3Dportage.portdb for cp in pdb.cp_all(): for cpv in pdb.cp_list(cp): flagged=3DFalse try: mtime, eclasses =3D pdb.aux_get(cpv,["_mtime_","INHERITED"]) except SystemExit: raise except: continue if mtime >=3D target: flagged=3DTrue else: try: for e in eclasses.split(): if pdb.eclassdb.eclasses[e][1] >=3D target: flagged=3DTrue break except KeyError: flagged=3DTrue if flagged: print cpv ' ~brian --ZJcv+A0YCCLh2VIg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCb/VMvdBxRoA3VU0RApDhAKDbUnr+LpxBk2pHyGzcFzDgw7HMCQCdEuGM uNnE0oQo+MrvnQ2BjlpDASI= =aAAY -----END PGP SIGNATURE----- --ZJcv+A0YCCLh2VIg-- -- gentoo-dev@gentoo.org mailing list