diff options
author | Chris Larson <kergoth@openedhand.com> | 2006-09-20 16:40:07 +0000 |
---|---|---|
committer | Chris Larson <kergoth@openedhand.com> | 2006-09-20 16:40:07 +0000 |
commit | dd9ff71de45785a4a38b5ce6c017161655f7db3e (patch) | |
tree | b1553cb6edcc98ff8a04a51c151eba9aebfd2dd1 /meta/classes/package.bbclass | |
parent | cdb95170a553b5c367ccb26fb0f4a632ecfc0dcd (diff) | |
download | poky-dd9ff71de45785a4a38b5ce6c017161655f7db3e.tar.gz |
Package.bbclass: sync with upstream oe legitimize_package_name.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@730 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 8a7760724e..d39a1afb70 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -1,4 +1,15 @@ | |||
1 | def legitimize_package_name(s): | 1 | def legitimize_package_name(s): |
2 | import re | ||
3 | |||
4 | def fixutf(m): | ||
5 | cp = m.group(1) | ||
6 | if cp: | ||
7 | return ('\u%s' % cp).decode('unicode_escape').encode('utf-8') | ||
8 | |||
9 | # Handle unicode codepoints encoded as <U0123>, as in glibc locale files. | ||
10 | s = re.sub('<U([0-9A-Fa-f]{1,4})>', fixutf, s) | ||
11 | |||
12 | # Remaining package name validity fixes | ||
2 | return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-') | 13 | return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-') |
3 | 14 | ||
4 | STAGING_PKGMAPS_DIR ?= "${STAGING_DIR}/pkgmaps" | 15 | STAGING_PKGMAPS_DIR ?= "${STAGING_DIR}/pkgmaps" |