[Mageia-dev] Importing RPM Spec File Syntax

Colin Guthrie mageia at colin.guthr.ie
Mon Jan 17 23:07:04 CET 2011


'Twas brillig, and Florian Hubold at 17/01/11 21:53 did gyre and gimble:
> Am 15.01.2011 11:08, schrieb Remy CLOUARD:
>> http://mageia.org/wiki/doku.php?id=spec_syntax
>>
>> Please review this page as it’s one of the most important one for the
>> beginning of the mentoring process, with the RPM Howto page (yet to be
>> imported).
> 
> I have one comment, or more of a question: Why is it that some time ago
> there used to be this syntax as de-facto standard:
> 
> %define name
> Name: %name
> 
> Never understood this, so i went with what seems the new standard,
> which saves you at least 3 lines per spec and improving readability.
> 
> So anyone can enlighten me why name, release and version had %defines?

I think the general reason was that you quite often want to use %name in
other places too. e.g. Obsoletes: %name-redundant-old-subpackage

Ditto for %version.

While you can use these without %defining them (just by virtue of them
being the Name: or Version: etc., I think it's more declarative and
deterministic to define them.

There could be other reasons too (e.g. update scripts?) and also just to
keep the critical things right at the top of the file for easy access.

Other than that I can't think of any reasons.

Col


-- 

Colin Guthrie
mageia(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


More information about the Mageia-dev mailing list