While I'm getting ready to wire up miRE patterns to globally
filter Requires: and Provides:, its likely time to take a stab
at describing how PLD is already filtering dependencies everywhere
successfully.
Here are all PLD *.spec files:
[...@wellfleet SPECS]$ ls -1 *.spec | wc -l
13533
And here's an estimate of the spec files that are filtering deps:
[...@wellfleet SPECS]$ grep -l _noautoreq *.spec | wc -l
459
[...@wellfleet SPECS]$ grep -l _noautoprov *.spec | wc -l
45
Here's an example that most everyone can relate to, from opera.spec.
...
%prep
%ifarch %{ix86}
%if %{with qt4}
%setup -q -T -b 13 -n %{name}-%{version}-%{buildid}.gcc4-qt4.i386
%define _noautoreq 'libpng12.so.0(.*)'
%else
...
The added exclude pattern
%define _noautoreq 'libpng12.so.0(.*)'
filters out matching Requires:, no fuss, no muss.
There's another type of exclude pattern used by PLD that disables
running
dependency extraction on a given file.
Here's an example of the automagic dependecy extraction disabling
usage case,
from the PLD wget.spec file:
A file path matching
%define _noautoreqfiles %{_bindir}/rmold
will not have whatever dependency extraction helper script run on that
file.
Where the PLD filtering gets interesting (to me anyways), is when filter
patterns are added at the distro build level persistently. Anything
done in *.spec files is highly unportable to other distro dialects and
generally
just gets nuked. But the same filter patterns can be added to global
build factory configuration, and, if someone designs a per-package
hierarchical inheiritance for per-package build macros, then there's
plain and simply no need to go off and edit gazillions of spec files
just because you can.
(aside)
Note also that PCRE or glob patterns, with "grep -v" negation, will
be permitted when I finish.
Note also that global macro configuration can __PREVENT__ overrides
in *.spec files using the '.' RDONLY operation like
%._noautoreq 'libpng12.so.0(.*)'
%._noautoreqfiles %{_bindir}/rmold
if necessary.
So that's PLD dependency filtering in a nutshell. Q.E.D.
I would have incorporated the rpm-pld-autodeps patch into RPM years ago,
but I needed to commit to a *RE dialect first: PCRE.
So its time to start the discussion:
Is the above syntax using patterns through macros "gud enuf" @rpm5.org?
73 de Jeff back to wiring up miRE patterns to finish the implementation
______________________________________________________________________
RPM Package Manager http://rpm5.org
Developer Communication List rpm-devel@rpm5.org