Re: rpm.RPMTAG_SOURCERPM vs rpm.RPMTAG_SOURCEPACKAGE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ville Skyttä <ville.skytta@xxxxxx> 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? Panu? How about:

-    if hdr[rpm.RPMTAG_SOURCERPM]:
+    if hdr[rpm.RPMTAG_SOURCERPM] or name.startswith('gpg-pubkey'):

...worse/better?

-- 
James Antill -- james@xxxxxxx
_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxx
http://lists.baseurl.org/mailman/listinfo/yum


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux