PackagingDrafts/global preferred over define

= %global preferred over %define =

current usage of %define beneath Packaging

 * Packaging/Perl
 * Packaging/Ruby
 * Packaging/Python
 * Packaging/DistTag

all uses are for either


 * usage, or
 * global top level macro definitions.

So both can be simply.

%global preferred over %define
Use  instead of , unless you really need only locally defined submacros within other macro definitions (a very rare case).

Rationale: The two macro defining statements behave the same when they are a the top level of rpm's nesting level.

But when they are used in nested macro expansions (like in  constructs,   theoretically only lasts until the end brace (local scope), while   definitions have global scope.

The reason this hasn't bitten us as often is that due to a minor bug in rpm the invalidated local macro definition is not garbage collected unless other events force rpm to. So the bug is seldomly triggered, but when it is, it is difficult to diagnose the issue. That's why we'd like to keep away from s and educate packagers to use   by default to avoid creation of new latent bugs.