summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2012-02-29 22:15:21 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-01 15:51:35 +0000
commit24883b4fc72432f9d12df7682dfd4207a719060b (patch)
tree614766862bf46d148d948825f9cfeec92a583cb4
parent61d2081d2411e5e709bf6959f486e286b20477f4 (diff)
downloadpoky-24883b4fc72432f9d12df7682dfd4207a719060b.tar.gz
Hob(crumbs/hoblistmodel.py): Add mapping for rprovides and pkg
When checking the package's RDEPENDS information, we will see some case like A RDEPENDS virtual-b, and B RPROVIDES virtual-b, we need to reflect this relationship in packaging selection. (Bitbake rev: 44562593556e67d7976a124d5a420938aff95e0c) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/ui/crumbs/hoblistmodel.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
index e440979434..0b7c0cbf4a 100644
--- a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
@@ -51,6 +51,7 @@ class PackageListModel(gtk.TreeStore):
51 self.pkgs_size = 0 51 self.pkgs_size = 0
52 self.pn_path = {} 52 self.pn_path = {}
53 self.pkg_path = {} 53 self.pkg_path = {}
54 self.rprov_pkg = {}
54 55
55 gtk.TreeStore.__init__ (self, 56 gtk.TreeStore.__init__ (self,
56 gobject.TYPE_STRING, 57 gobject.TYPE_STRING,
@@ -71,10 +72,15 @@ class PackageListModel(gtk.TreeStore):
71 Returns the path in the model or None 72 Returns the path in the model or None
72 """ 73 """
73 def find_path_for_item(self, item_name): 74 def find_path_for_item(self, item_name):
75 pkg = item_name
74 if item_name not in self.pkg_path.keys(): 76 if item_name not in self.pkg_path.keys():
75 return None 77 if item_name not in self.rprov_pkg.keys():
76 else: 78 return None
77 return self.pkg_path[item_name] 79 pkg = self.rprov_pkg[item_name]
80 if pkg not in self.pkg_path.keys():
81 return None
82
83 return self.pkg_path[pkg]
78 84
79 def find_item_for_path(self, item_path): 85 def find_item_for_path(self, item_path):
80 return self[item_path][self.COL_NAME] 86 return self[item_path][self.COL_NAME]
@@ -137,6 +143,7 @@ class PackageListModel(gtk.TreeStore):
137 self.pkgs_size = 0 143 self.pkgs_size = 0
138 self.pn_path = {} 144 self.pn_path = {}
139 self.pkg_path = {} 145 self.pkg_path = {}
146 self.rprov_pkg = {}
140 147
141 for pkginfo in pkginfolist: 148 for pkginfo in pkginfolist:
142 pn = pkginfo['PN'] 149 pn = pkginfo['PN']
@@ -160,6 +167,8 @@ class PackageListModel(gtk.TreeStore):
160 rdep = pkginfo['RDEPENDS_%s' % pkg] if 'RDEPENDS_%s' % pkg in pkginfo.keys() else "" 167 rdep = pkginfo['RDEPENDS_%s' % pkg] if 'RDEPENDS_%s' % pkg in pkginfo.keys() else ""
161 rrec = pkginfo['RRECOMMENDS_%s' % pkg] if 'RRECOMMENDS_%s' % pkg in pkginfo.keys() else "" 168 rrec = pkginfo['RRECOMMENDS_%s' % pkg] if 'RRECOMMENDS_%s' % pkg in pkginfo.keys() else ""
162 rprov = pkginfo['RPROVIDES_%s' % pkg] if 'RPROVIDES_%s' % pkg in pkginfo.keys() else "" 169 rprov = pkginfo['RPROVIDES_%s' % pkg] if 'RPROVIDES_%s' % pkg in pkginfo.keys() else ""
170 for i in rprov.split():
171 self.rprov_pkg[i] = pkg
163 172
164 if 'ALLOW_EMPTY_%s' % pkg in pkginfo.keys(): 173 if 'ALLOW_EMPTY_%s' % pkg in pkginfo.keys():
165 allow_empty = pkginfo['ALLOW_EMPTY_%s' % pkg] 174 allow_empty = pkginfo['ALLOW_EMPTY_%s' % pkg]