On Wed, 6 Oct 2004 20:47:02 +0200, Michael Schwendt wrote:
On Wed, 6 Oct 2004 14:10:30 -0400, Matthew Miller wrote:
> > rpm -qpl package.src.rpm | grep \.spec
>
> What do you do if there's more than one spec file?
Okay, okay. So, multiple additional spec files as %{SOURCEX} values?
Then I would use something like this
$ rpm -qp package.src.rpm --qf '[%{basenames}\n]' \
grep -v "$(rpm -qp package.src.rpm --qf '[%{source}\n]')"
or process the output with some scripting language (if need be).
| pipe missing in front of grep, although it will fail with larger
src.rpms. But apparently, original poster just was searching for the
[%{array}] notation of RPM query flags. So, comparing '[%{basenames} ]'
and '[%{source} ]' arrays would reveal the spec file name. In case
an included patch is called foo.spec, you would need to search through
'[%{patch} ]', too.
--
Fedora Core release 2 (Tettnang) - Linux 2.6.8-1.521
loadavg: 1.25 1.17 1.11