Gentoo Archives: gentoo-dev

From: Francesco Riosa <francesco@×××××××××.it>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] why do different ebuilds have the same version number?
Date: Wed, 27 Apr 2005 20:02:17
Message-Id: 426FEFD3.3080204@pnpitalia.it
In Reply to: Re: [gentoo-dev] why do different ebuilds have the same version number? by Brian Harring
1 Brian Harring wrote:
2
3 >>>[snip]
4 >>>
5 >>>
6 >>Why you could not use ctime/mtime ? Isn't possible to make a check like
7 >>you do now but only on a filtered by "mtime" list of ebuild ?
8 >>A command like this
9 >># find . -name "*.ebuild" -and -mtime "-7" -or -ctime "-7"
10 >>
11 >>
12 >Actually... nope. :)
13 >You're forgetting about eclass changes, which can adjust metadata
14 >(deps) of an ebuild w/out the ebuild ever being modified...
15 >~brian
16 >
17 >
18 right was forgotting that :P , what about something like this ?
19
20 HAS_MODIFIED_ECLASS=$( find /usr/portage/eclass/ -name "*.eclass" -and
21 -ctime "-1" -mtime "-1" )
22 if [[ -z $HAS_MODIFIED_ECLASS ]] ; then
23 echo "Good, using faster method"
24 find /usr/portage -name "*.ebuild" \
25 -and -mtime "-1" \
26 -or -ctime "-1" \
27 -exec something_here.sh
28 else
29 find /usr/portage -name "*.ebuild" \
30 -exec something_here.sh
31 fi
32
33 will save you often, eclasses are not so frequently updated ;-)
34 --
35 gentoo-dev@g.o mailing list

Replies