[Rpm-maint] rpm --verify -p does not work
Panu Matilainen
pmatilai at laiskiainen.org
Fri May 13 12:49:37 UTC 2011
On 05/12/2011 06:56 PM, Michael Schroeder wrote:
>
> rpm --verify -p<rpm> doesn't run verifyscripts since rpm-4.8.
> For rpm-4.9 it segfaults.
> The code fakes an TR_REMOVE TE, which works for installed
> packages but fails if an rpm is given on the command line.
>
> It segfaults in 4.9 because of the collection code. I don't
> think collections should be run for --verify ;-)
Yup, and actually there's more to it than just verifyscript: the
%pretrans and %posttrans could also cause collections to execute, and
collections don't take --justdb / --test (and maybe something else too)
into account. Collections are marked EXPERIMENTAL in 4.9.0 for a reason
:) but of course an experimental feature shouldn't cause segfaults and
other side-effects when not actually used.
>
> Patch attached. It now calls rpmteNew() directly and
> uses rpmteSetHeader() to attach the heade. I also needed
> to change the code in rpmte so that it no longer calls
> rpmteOpen() for a PKG_VERIFY goal, but that doesn't seem
> to be bad anyway.
Hmm. Collections aside, me thinks the actual bug is permitting verify to
run on non-installed packages in the first place, verify (and
verifyscript) is only meaningful for installed packages.
- Panu -
More information about the Rpm-maint
mailing list