Remove legacy "%global preferred over %define" guideline

There is no strong reason to universally recommend %global over %define,
and RPM upstream has good documentation in rpm-macros(7) explaining the
difference.
See #1449 and
#1454 for
more discussion.

Closes: #1449
This commit is contained in:
Maxwell G 2026-05-18 00:06:59 -05:00 committed by James Antill
commit 1ecece9cb6

View file

@ -2161,25 +2161,6 @@ Note: If you call Perl or Python in your spec file
(and it is not already a BuildRequires for the package),
you need to explicitly add a BuildRequires for Perl or Python.
== `+%global+` Preferred Over `+%define+`
Use `+%global+` instead of `+%define+`,
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 at the top level of rpm's nesting level.
But when they are used in nested macro expansions
(like in `+%{!?foo: ... }+` constructs,
`+%define+` theoretically only lasts until the end brace (local scope),
while `+%global+` definitions have global scope.
Note that %define and %global differ in more ways than just scope:
the body of a %define'd macro is lazily expanded (i.e., when used),
but the body of %global is expanded at definition time.
It's possible to use %%-escaping to force lazy expansion of %global.
[#handling_locale_files]
== Handling Locale Files