summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/package_manager.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 27b2f17f95..e6319dc3b8 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -40,6 +40,7 @@ def opkg_query(cmd_output):
40 ver = "" 40 ver = ""
41 filename = "" 41 filename = ""
42 dep = [] 42 dep = []
43 prov = []
43 pkgarch = "" 44 pkgarch = ""
44 for line in cmd_output.splitlines()+['']: 45 for line in cmd_output.splitlines()+['']:
45 line = line.rstrip() 46 line = line.rstrip()
@@ -64,6 +65,10 @@ def opkg_query(cmd_output):
64 dep.append("%s [REC]" % recommend) 65 dep.append("%s [REC]" % recommend)
65 elif line.startswith("PackageArch: "): 66 elif line.startswith("PackageArch: "):
66 pkgarch = line.split(": ")[1] 67 pkgarch = line.split(": ")[1]
68 elif line.startswith("Provides: "):
69 provides = verregex.sub('', line.split(": ")[1])
70 for provide in provides.split(", "):
71 prov.append(provide)
67 72
68 # When there is a blank line save the package information 73 # When there is a blank line save the package information
69 elif not line: 74 elif not line:
@@ -72,12 +77,13 @@ def opkg_query(cmd_output):
72 filename = "%s_%s_%s.ipk" % (pkg, ver, arch) 77 filename = "%s_%s_%s.ipk" % (pkg, ver, arch)
73 if pkg: 78 if pkg:
74 output[pkg] = {"arch":arch, "ver":ver, 79 output[pkg] = {"arch":arch, "ver":ver,
75 "filename":filename, "deps": dep, "pkgarch":pkgarch } 80 "filename":filename, "deps": dep, "pkgarch":pkgarch, "provs": prov}
76 pkg = "" 81 pkg = ""
77 arch = "" 82 arch = ""
78 ver = "" 83 ver = ""
79 filename = "" 84 filename = ""
80 dep = [] 85 dep = []
86 prov = []
81 pkgarch = "" 87 pkgarch = ""
82 88
83 return output 89 return output
@@ -354,7 +360,7 @@ class DpkgPkgsList(PkgsList):
354 "--admindir=%s/var/lib/dpkg" % self.rootfs_dir, 360 "--admindir=%s/var/lib/dpkg" % self.rootfs_dir,
355 "-W"] 361 "-W"]
356 362
357 cmd.append("-f=Package: ${Package}\nArchitecture: ${PackageArch}\nVersion: ${Version}\nFile: ${Package}_${Version}_${Architecture}.deb\nDepends: ${Depends}\nRecommends: ${Recommends}\n\n") 363 cmd.append("-f=Package: ${Package}\nArchitecture: ${PackageArch}\nVersion: ${Version}\nFile: ${Package}_${Version}_${Architecture}.deb\nDepends: ${Depends}\nRecommends: ${Recommends}\nProvides: ${Provides}\n\n")
358 364
359 try: 365 try:
360 cmd_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip().decode("utf-8") 366 cmd_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip().decode("utf-8")