Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] CVS headers in ebuilds
Date: Sun, 10 Apr 2016 16:16:21
Message-Id: 22282.31813.77241.710735@a1i15.kph.uni-mainz.de
In Reply to: Re: [gentoo-dev] Re: CVS headers in ebuilds by Lars Wendler
1 >>>>> On Sat, 9 Apr 2016, Lars Wendler wrote:
2
3 >>> > Yes, I still use these lines to check for ebuild changes between
4 >>> > portage and my personal overlay. So please keep this line.
5
6 > Enable the ident feature for *.ebuild files in git:
7
8 > $ cat ~/gentoo/.git/info/attributes
9 > *.ebuild ident
10
11 > Now re-checkout every ebuild you wanna track.
12
13 > $ git checkout --
14 > ~/gentoo/www-client/seamonkey/seamonkey-2.40.ebuild
15
16 > Once you have done that those ebuilds will have some hash in the
17 > $Id$ field:
18
19 > $ grep '$Id' ~/gentoo/www-client/seamonkey/seamonkey-2.40.ebuild
20 > # $Id: 5ecd7709c6c8a316d9f005b4e4a0a54da81eb048 $
21
22 > The same hash is in each corresponding ebuild in my personal overlay
23 > as well. Occasionally I run a script to compare ebuilds from my
24 > overlay with the one from the git tree. When the hash is different
25 > something in the gentoo ebuild has changed and I can decide if I
26 > want to apply these changes to ebuilds in my overlay as well.
27
28 Why would you need $Id$ feature for this? "git ls-files -s" gives you
29 the hash of the blob as well, is more efficient than grep, and even
30 works recursively on a directory tree.
31
32 $ git ls-files -s -- www-client/seamonkey/seamonkey-2.40.ebuild
33 100644 5ecd7709c6c8a316d9f005b4e4a0a54da81eb048 0 www-client/seamonkey/seamonkey-2.40.ebuild
34
35 Ulrich

Replies

Subject Author
Re: [gentoo-dev] CVS headers in ebuilds "Robin H. Johnson" <robbat2@g.o>