mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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
This commit is contained in:
@@ -1,4 +1,15 @@
|
||||
def legitimize_package_name(s):
|
||||
import re
|
||||
|
||||
def fixutf(m):
|
||||
cp = m.group(1)
|
||||
if cp:
|
||||
return ('\u%s' % cp).decode('unicode_escape').encode('utf-8')
|
||||
|
||||
# Handle unicode codepoints encoded as <U0123>, as in glibc locale files.
|
||||
s = re.sub('<U([0-9A-Fa-f]{1,4})>', fixutf, s)
|
||||
|
||||
# Remaining package name validity fixes
|
||||
return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-')
|
||||
|
||||
STAGING_PKGMAPS_DIR ?= "${STAGING_DIR}/pkgmaps"
|
||||
|
||||
Reference in New Issue
Block a user