summaryrefslogtreecommitdiff
path: root/meta/lib/oe/packagedata.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/packagedata.py')
-rw-r--r--meta/lib/oe/packagedata.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/lib/oe/packagedata.py b/meta/lib/oe/packagedata.py
index cd5f0445f5..32e5c82a94 100644
--- a/meta/lib/oe/packagedata.py
+++ b/meta/lib/oe/packagedata.py
@@ -1,4 +1,5 @@
import codecs
+import os
def packaged(pkg, d):
return os.access(get_subpkgedata_fn(pkg, d) + '.packaged', os.R_OK)
@@ -7,7 +8,7 @@ def read_pkgdatafile(fn):
pkgdata = {}
def decode(str):
- c = codecs.getdecoder("string_escape")
+ c = codecs.getdecoder("unicode_escape")
return c(str)[0]
if os.access(fn, os.R_OK):
@@ -56,7 +57,7 @@ def read_subpkgdata_dict(pkg, d):
def _pkgmap(d):
"""Return a dictionary mapping package to recipe name."""
- pkgdatadir = d.getVar("PKGDATA_DIR", True)
+ pkgdatadir = d.getVar("PKGDATA_DIR")
pkgmap = {}
try:
@@ -65,7 +66,7 @@ def _pkgmap(d):
bb.warn("No files in %s?" % pkgdatadir)
files = []
- for pn in filter(lambda f: not os.path.isdir(os.path.join(pkgdatadir, f)), files):
+ for pn in [f for f in files if not os.path.isdir(os.path.join(pkgdatadir, f))]:
try:
pkgdata = read_pkgdatafile(os.path.join(pkgdatadir, pn))
except OSError: