From e005aa91f837e0149fc7a95718cf8e8b916dedd9 Mon Sep 17 00:00:00 2001 From: Anders F Bjorklund Date: Sun, 9 Mar 2014 22:53:35 +0100 Subject: [PATCH] Only use nodigests/nosignatures where available These have been removed in rpm5.org (but not in rpm.org). See http://rpm5.org/cvs/chngview?cn=16659 for the removal. --- smart/plugins/yumchannelsync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smart/plugins/yumchannelsync.py b/smart/plugins/yumchannelsync.py index 17695d9..f8107e6 100644 --- a/smart/plugins/yumchannelsync.py +++ b/smart/plugins/yumchannelsync.py @@ -56,8 +56,8 @@ def _getreleasever(): rpmroot = sysconf.get("rpm-root", "/") ts = rpmUtils.transaction.initReadOnlyTransaction(root=rpmroot) - #ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS)) - ts.pushVSFlags(~(rpm._RPMVSF_NODIGESTS)) + if hasattr(rpm, '_RPMVSF_NOSIGNATURES') and hasattr(rpm, '_RPMVSF_NODIGESTS'): + ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS)) releasever = None # HACK: we're hard-coding the most used distros, will add more if needed idx = ts.dbMatch('provides', 'fedora-release')