build/interdep.c: recognize %_deps_optimization

%_deps_optimization is now treated as optimization level 0, 1, or 2
(the default is 2).  Level 1 will make single-package optimizations.
Level 2 will additionally optimize dependencies between subpackages.
This commit is contained in:
Alexey Tourbin 2011-02-07 06:10:37 +03:00
parent f5ed7f870a
commit e9d4612abe
2 changed files with 4 additions and 1 deletions

View File

@ -637,6 +637,9 @@ int processInterdep(Spec spec)
pruneDebuginfoSrc(r, spec);
liftDebuginfoDeps(r, spec);
r = freeRequires(r);
int optlevel = rpmExpandNumeric("%{?_deps_optimization}%{?!_deps_optimization:2}");
if (optlevel < 2)
return 0;
r = makeRequires(spec);
pruneExtraDeps(r, spec);
pruneExtraRDeps(r, spec);

View File

@ -16,7 +16,7 @@ deps_opt_enabled (void)
if (!initialized)
{
initialized = 1;
enabled = rpmExpandNumeric ("%{?_deps_optimization:%{_deps_optimization}}%{?!_deps_optimization:1}");
enabled = rpmExpandNumeric ("%{?_deps_optimization}%{?!_deps_optimization:1}");
}
return enabled;