diff options
author | Jian Liu <jian.liu@windriver.com> | 2015-08-25 16:29:01 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-04 16:23:48 +0100 |
commit | 1362986886cc96c8cc11fb60795f729b41770414 (patch) | |
tree | 423418e5293da006be87fde6967dadcb583b869b /meta | |
parent | 635d38594c7b4c780d2c123146e4bf09722932aa (diff) | |
download | poky-1362986886cc96c8cc11fb60795f729b41770414.tar.gz |
sdk.py: fix conflicts of packages
If packages are conveyed to smart to install at the same time,
conflicts will not happen.
Try to install packages into sdk image at the same time.
This patch is not so perfect. For example,
IMAGE_INSTALL += "lib32-ncurses"
IMAGE_INSTALL += "ncurses-dev"
ncurses-dev and lib32-ncurses-dev will have conflicts during packages installation.
(From OE-Core rev: f2b64f725803ad8be7c2876c531e057a4fe5ca7c)
Signed-off-by: Jian Liu <jian.liu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/sdk.py | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py index a6767412c7..53da0f01ad 100644 --- a/meta/lib/oe/sdk.py +++ b/meta/lib/oe/sdk.py | |||
@@ -107,10 +107,17 @@ class RpmSdk(Sdk): | |||
107 | pm.dump_all_available_pkgs() | 107 | pm.dump_all_available_pkgs() |
108 | pm.update() | 108 | pm.update() |
109 | 109 | ||
110 | for pkg_type in self.install_order: | 110 | pkgs = [] |
111 | if pkg_type in pkgs_to_install: | 111 | pkgs_attempt = [] |
112 | pm.install(pkgs_to_install[pkg_type], | 112 | for pkg_type in pkgs_to_install: |
113 | [False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY]) | 113 | if pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY: |
114 | pkgs_attempt += pkgs_to_install[pkg_type] | ||
115 | else: | ||
116 | pkgs += pkgs_to_install[pkg_type] | ||
117 | |||
118 | pm.install(pkgs) | ||
119 | |||
120 | pm.install(pkgs_attempt, True) | ||
114 | 121 | ||
115 | def _populate(self): | 122 | def _populate(self): |
116 | bb.note("Installing TARGET packages") | 123 | bb.note("Installing TARGET packages") |
@@ -184,10 +191,17 @@ class OpkgSdk(Sdk): | |||
184 | 191 | ||
185 | pm.update() | 192 | pm.update() |
186 | 193 | ||
187 | for pkg_type in self.install_order: | 194 | pkgs = [] |
188 | if pkg_type in pkgs_to_install: | 195 | pkgs_attempt = [] |
189 | pm.install(pkgs_to_install[pkg_type], | 196 | for pkg_type in pkgs_to_install: |
190 | [False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY]) | 197 | if pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY: |
198 | pkgs_attempt += pkgs_to_install[pkg_type] | ||
199 | else: | ||
200 | pkgs += pkgs_to_install[pkg_type] | ||
201 | |||
202 | pm.install(pkgs) | ||
203 | |||
204 | pm.install(pkgs_attempt, True) | ||
191 | 205 | ||
192 | def _populate(self): | 206 | def _populate(self): |
193 | bb.note("Installing TARGET packages") | 207 | bb.note("Installing TARGET packages") |
@@ -260,10 +274,17 @@ class DpkgSdk(Sdk): | |||
260 | pm.write_index() | 274 | pm.write_index() |
261 | pm.update() | 275 | pm.update() |
262 | 276 | ||
263 | for pkg_type in self.install_order: | 277 | pkgs = [] |
264 | if pkg_type in pkgs_to_install: | 278 | pkgs_attempt = [] |
265 | pm.install(pkgs_to_install[pkg_type], | 279 | for pkg_type in pkgs_to_install: |
266 | [False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY]) | 280 | if pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY: |
281 | pkgs_attempt += pkgs_to_install[pkg_type] | ||
282 | else: | ||
283 | pkgs += pkgs_to_install[pkg_type] | ||
284 | |||
285 | pm.install(pkgs) | ||
286 | |||
287 | pm.install(pkgs_attempt, True) | ||
267 | 288 | ||
268 | def _populate(self): | 289 | def _populate(self): |
269 | bb.note("Installing TARGET packages") | 290 | bb.note("Installing TARGET packages") |