Re: [cooker-commits] [svn-commit] r769353 - cooker/kcm-grub2/current/SPECS

Andrey Bondrov <[email protected]> Sat, 28 Jan 2012 05:41:53 +1100
Newsgroups gmane.linux.mandrake.cooker.devel
Message-ID <[email protected]>
28.01.2012 05:09, Jeffrey Johnson пишет:
> On Jan 27, 2012, at 11:53 AM, Andrey Bondrov wrote:
>
>> 1. All locales should be managed by find_lang instead of listing every file in %files section.
>>
> An entirely different (but related) issue:
>
> 	No *.spec should include locales for group/summary/description.
>
> Last I checked (about a year ago) there were ~900 *.spec recipes
> that has locales with description/summary/group.

BTW, how do we handle such things now?

>> 5. $RPM_BUILD_ROOT is something we should avoid. Always use %{buildroot} instead.
>>
> There is literally no difference whether $RPM_BUILD_ROOT or %buildroot is
> used. They will _ALWAYS_ have the same value.

That's true. But I guess we have some kind of policy about using 
%{buildroot} instead of $RPM_BUILD_ROOT. For aesthetic reasons only.

And so far I remember there was one more aesthetic policy - regarding 
curly braces ////usage.
1. Macro that does something must be used _without_ curly braces. Like 
%make or %__rm.
2. Macro that is just a variable must be used _with_ curly braces. Like 
%{_libdir} or %{mdvver}.

>> 7. You don't have to write "%setup -n %{name}-%{version} -q" because it's the same as "%setup -q"
>>
> I could pretty easily change the -q "opt-out" disabler into
> a -v "opt-in" enabler and change the default behavior of
> %setup so that even -q need not be specified in *.spec recipes.
>
> If you think that is a good idea, please add a bug report at
> 	http://launchpad.net/rpm
> which will then be scheduled into 2012 as appropriate.

I will (little later). It's indeed a good idea because we use %setup 
with -q in almost every (if not every) spec.