Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] ebuild laziness and binpkg overhead
Date: Fri, 29 Jun 2012 05:35:13
Message-Id: 201206290133.45090.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] ebuild laziness and binpkg overhead by Samuli Suominen
1 On Tuesday 19 June 2012 23:27:06 Samuli Suominen wrote:
2 > On 06/20/2012 06:19 AM, Mike Frysinger wrote:
3 > > On Tuesday 19 June 2012 22:46:26 Samuli Suominen wrote:
4 > >> On 06/15/2012 06:10 PM, Mike Frysinger wrote:
5 > >>> On Friday 15 June 2012 03:44:14 Samuli Suominen wrote:
6 > >>>> On 06/13/2012 06:02 AM, Mike Frysinger wrote:
7 > >>>>> i've noticed a growing trend where people put setup of variables into
8 > >>>>> pkg_setup that only matter to src_* funcs presumably so they don't
9 > >>>>> have to call the respective src_* func from an inherited eclass.
10 > >>>>> unfortunately this adds pointless overhead to binpkgs. can we please
11 > >>>>> move away from this practice ?
12 > >>>>
13 > >>>> Every Xfce ebuild in gentoo-x86 is using pkg_setup() for 3 variables,
14 > >>>> DOCS for src_install, PATCHES for src_prepare
15 > >>>
16 > >>> these are static variables, so defining them in a func is pointless
17 > >>
18 > >> "sort of" not necessarily, 'has $useflag && PATCHES+=( )' has been used
19 > >> before, not sure if it's used in tree right now or not
20 > >
21 > > as we've always said, USE conditional patches are to be highly
22 > > discouraged
23 >
24 > I agree BUT there are cases where it's OK to use conditional patching:
25 >
26 > For example, libfoo-0.1.1 is broken and is fixed in git for master which
27 > will be in next release. The fix doesn't apply to 0.1.1 cleanly without
28 > heavy modifications.
29 > Then you would take the easiest possible route to get 0.1.1 working
30 > again, with the comfort of knowing it's properly fixed for the next
31 > version.
32
33 hypothetical situations are great and all, but how many of those apply to the
34 ebuilds you're worried about ? i'd wager most do not. can we please fix the
35 majority here ? i'd be significantly less grumpy if we treated this as the
36 exception instead of the rule.
37 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature