Re: rpm.RPMTAG_SOURCERPM vs rpm.RPMTAG_SOURCEPACKAGE

Ville Skyttä <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
On Friday 06 March 2009, James Antill wrote:
> Ville Skyttä <[email protected]> writes:
> > I hate to return to this, but the fix-on-import behavior means that
> > gpg-pubkeys imported with older versions of rpm aren't affected, and
> > continue to cause problems after upgrading to a later rpm version if
> > the keys are not re-imported.  The attached patch makes
> > pkgTupleFromHeader() take this into account, and fixes the problem for
> > me.
>
> --- a/rpmUtils/miscutils.py
> +++ b/rpmUtils/miscutils.py
> -    if hdr[rpm.RPMTAG_SOURCERPM]:
> +    if hdr[rpm.RPMTAG_SOURCERPM] or hdr[rpm.RPMTAG_SOURCEPACKAGE] != 1:
>          arch = hdr['arch']
>      else:
>          arch = 'src'
>
> ...doesn't the second one fail on some packages?

I don't know of any, and I think it wouldn't matter because of the "or" and 
the first one catching everything else I'm aware of except gpg-pubkeys.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.