]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/package_manager.py (rpm): Allow use of non-signed packages
authorOtavio Salvador <otavio@ossystems.com.br>
Mon, 2 Oct 2017 16:56:31 +0000 (13:56 -0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 6 Oct 2017 11:22:45 +0000 (12:22 +0100)
When we wish to use the package feed for local development, it does
not uses GPG signed feeds by default but dnf uses package signature
check. We need to configure the GPG signature check out so it works
out of box.

With this patch, installing non-signed packages works:

$: dnf install <package>

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oe/package_manager.py

index d458a9b01d52f2c344400739ccbfbb44c6619f66..6cbb61fd849a1d50c3150a88f7c959deb1e397a6 100644 (file)
@@ -548,11 +548,13 @@ class RpmPM(PackageManager):
         if feed_uris == "":
             return
 
+        gpg_opts = ''
         if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
-            gpg_opts = 'repo_gpgcheck=1\n'
+            gpg_opts += 'repo_gpgcheck=1\n'
             gpg_opts += 'gpgkey=file://%s/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-%s-%s\n' % (self.d.getVar('sysconfdir'), self.d.getVar('DISTRO'), self.d.getVar('DISTRO_CODENAME'))
-        else:
-            gpg_opts = ''
+
+        if self.d.getVar('RPM_SIGN_PACKAGES') == '0':
+            gpg_opts += 'gpgcheck=0\n'
 
         bb.utils.mkdirhier(oe.path.join(self.target_rootfs, "etc", "yum.repos.d"))
         remote_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())