]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/package_manager.py: Add processing for alternative SDK_OS
authorMark Hatle <mark.hatle@windriver.com>
Wed, 25 Jun 2014 00:28:07 +0000 (19:28 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 25 Jun 2014 10:49:39 +0000 (11:49 +0100)
For the meta-mingw layer, we need to process alternative SDK_OS, since this
is not a Linux based OS.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/package_manager.py

index 1c642053307a56bee04b5cb4a7b97867036697b3..18eb7929a9c5f441ef0789a147c0e277d556c37e 100644 (file)
@@ -739,11 +739,15 @@ class RpmPM(PackageManager):
 
         channel_priority = 5
         platform_dir = os.path.join(self.etcrpm_dir, "platform")
+        sdkos = self.d.getVar("SDK_OS", True)
         with open(platform_dir, "w+") as platform_fd:
             platform_fd.write(platform + '\n')
             for pt in platform_extra:
                 channel_priority += 5
-                platform_fd.write(re.sub("-linux.*$", "-linux.*\n", pt))
+                if sdkos:
+                    tmp = re.sub("-%s$" % sdkos, "-%s\n" % sdkos, pt)
+                tmp = re.sub("-linux.*$", "-linux.*\n", tmp)
+                platform_fd.write(tmp)
 
         # Tell RPM that the "/" directory exist and is available
         bb.note("configuring RPM system provides")