From: <fupan.li@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] oe-core:package_manager extract target arch from TARGET_SYS and add it into package_archs
Date: Thu, 24 Dec 2015 00:51:23 -0500 [thread overview]
Message-ID: <1450936283-177234-1-git-send-email-fupan.li@windriver.com> (raw)
From: fli <fupan.li@windriver.com>
Since the rpmbuild on the target will use TARGET_SYS as the
'target' to build the source rpm packages, which will extracted
the target arch from TARGET_SYS, such as if TARGET_SYS values
'arm-poky-linux-gnueabi', the target arch will be 'arm'.
In order to make the rpm pkgs built out on the target compatilbe
with target, extract the arch from TARGET_SYS and add it into
package archs which will be write into the rootfs's /etc/rpm/platform.
Signed-off-by: fli <fupan.li@windriver.com>
---
meta/lib/oe/package_manager.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 04812d2..e4b53a0 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -55,6 +55,16 @@ class RpmIndexer(Indexer):
target_os['default'] = self.d.getVar(os_var, True).strip()
else:
package_archs['default'] = self.d.getVar("PACKAGE_ARCHS", True).split()
+
+ #add the compatible arch extracted from TARGET_SYS.
+ #TARGET_SYS usually values as "arm-poky-linux-gnueabi",
+ #so the arch is 'arm'
+ target_sys = self.d.getVar("TARGET_SYS", True)
+ if target_sys:
+ target_arch = target_sys.split('-')[0]
+ if target_arch not in package_archs['default']:
+ package_archs['default'].append(target_arch)
+
# arch order is reversed. This ensures the -best- match is
# listed first!
package_archs['default'].reverse()
--
1.9.1
next reply other threads:[~2015-12-24 5:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-24 5:51 fupan.li [this message]
2016-01-07 14:23 ` [PATCH] oe-core:package_manager extract target arch from TARGET_SYS and add it into package_archs Burton, Ross
2016-01-08 1:53 ` fupan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1450936283-177234-1-git-send-email-fupan.li@windriver.com \
--to=fupan.li@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox