Ensure correct return code on malformed signature in packages
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 7 Dec 2012 11:54:23 +0000 (13:54 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 7 Dec 2012 12:12:44 +0000 (14:12 +0200)
commit518514b8d8a7377f89ecc111f6434d4735a5a1f8
treeea54e5ef90985477269e05ef6fc6b91458fb4186
parente364512a4ca9dd9018806544674719cfb95717ba
Ensure correct return code on malformed signature in packages

- rpmpkgRead() starts with assumed failure, but there are a number
  of places assigning the return code, and by the time we get
  to the parsePGPSig() calls its likely to be RPMRC_OK, so the
  jumps to exit result in "all is well" return code on a signature
  we couldn't even parse. Oops.
- Set the failure status explicitly to fix this fairly nasty regression
  introduced in commit e8bc3ff5d780f4ee6656c24464402723e5fb04f4, ie
  rpm >= 4.10.
(cherry picked from commit 96a616c6aed4c516789a154af188f005caf23f14)
lib/package.c