summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/package_manager.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 139a6211ee..8a58d611be 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -251,7 +251,9 @@ class RpmPM(PackageManager):
251 for arch in feed_archs: 251 for arch in feed_archs:
252 arch = arch.replace('-', '_') 252 arch = arch.replace('-', '_')
253 for p in self.fullpkglist: 253 for p in self.fullpkglist:
254 if pkg in p and '@' + arch in p: 254 regex_match = r"^%s-[^-]*-[^-]*@%s$" % \
255 (re.escape(pkg), re.escape(arch))
256 if re.match(regex_match, p) is not None:
255 # First found is best match 257 # First found is best match
256 # bb.note('%s -> %s' % (pkg, pkg + '@' + arch)) 258 # bb.note('%s -> %s' % (pkg, pkg + '@' + arch))
257 return pkg + '@' + arch 259 return pkg + '@' + arch
@@ -328,7 +330,7 @@ class RpmPM(PackageManager):
328 platform_fd.write(platform + '\n') 330 platform_fd.write(platform + '\n')
329 for pt in platform_extra: 331 for pt in platform_extra:
330 channel_priority += 5 332 channel_priority += 5
331 platform_fd.write(pt + '.*\n') 333 platform_fd.write(re.sub("-linux.*$", "-linux.*\n", pt))
332 334
333 # Tell RPM that the "/" directory exist and is available 335 # Tell RPM that the "/" directory exist and is available
334 bb.note("configuring RPM system provides") 336 bb.note("configuring RPM system provides")
@@ -512,9 +514,8 @@ class RpmPM(PackageManager):
512 output = subprocess.check_output(cmd.split()) 514 output = subprocess.check_output(cmd.split())
513 bb.note(output) 515 bb.note(output)
514 except subprocess.CalledProcessError as e: 516 except subprocess.CalledProcessError as e:
515 if not attempt_only: 517 bb.fatal("Unable to install packages. Command %s "
516 bb.note("Unable to install packages. Command %s " 518 "returned %d" % (cmd, e.returncode))
517 "returned %d" % (cmd, e.returncode))
518 519
519 ''' 520 '''
520 Remove pkgs with smart, the pkg name is smart/rpm format 521 Remove pkgs with smart, the pkg name is smart/rpm format
@@ -551,16 +552,14 @@ class RpmPM(PackageManager):
551 self._invoke_smart('upgrade') 552 self._invoke_smart('upgrade')
552 553
553 def write_index(self): 554 def write_index(self):
554 arch_list = list() 555 arch_list = set()
555 for mlib in self.ml_prefix_list: 556 for mlib in self.ml_prefix_list:
556 for arch in self.ml_prefix_list[mlib]: 557 for arch in self.ml_prefix_list[mlib]:
557 if arch not in arch_list: 558 if arch not in arch_list:
558 arch_list.append(arch) 559 arch_list.add(arch.replace('-', '_'))
559 560
560 sdk_pkg_archs = self.d.getVar('SDK_PACKAGE_ARCHS', True) 561 sdk_pkg_archs = (self.d.getVar('SDK_PACKAGE_ARCHS', True) or "").replace('-', '_')
561 if sdk_pkg_archs is not None: 562 arch_list = arch_list.union(set(sdk_pkg_archs.split()))
562 arch_list += [i.replace('-', '_') for i in sdk_pkg_archs.split()
563 if i.replace('-', '_') not in arch_list]
564 563
565 rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo") 564 rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo")
566 index_cmds = [] 565 index_cmds = []
@@ -730,7 +729,8 @@ class RpmPM(PackageManager):
730 return 729 return
731 730
732 def save_rpmpostinst(self, pkg): 731 def save_rpmpostinst(self, pkg):
733 mlibs = self.d.getVar('MULTILIB_GLOBAL_VARIANTS').split() 732 mlibs = (self.d.getVar('MULTILIB_GLOBAL_VARIANTS') or "").split()
733
734 new_pkg = pkg 734 new_pkg = pkg
735 # Remove any multilib prefix from the package name 735 # Remove any multilib prefix from the package name
736 for mlib in mlibs: 736 for mlib in mlibs: