Skip to content

Commit

Permalink
bitbake: remove translate_license function
Browse files Browse the repository at this point in the history
* now the license value sanitization should be good enough from
  utils.get_license

Signed-off-by: Martin Jansa <martin.jansa@lge.com>
  • Loading branch information
shr-project committed Sep 18, 2020
1 parent a74c0ed commit cbf552a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions superflore/generators/bitbake/yocto_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,6 @@ def get_bottom_inherit_line(self):
def trim_hyphens(self, s):
return self.multi_hyphen_re.sub('-', s)

def translate_license(self, lic):
conversion_table = {ord(' '): '-', ord('/'): '-', ord(':'): '-',
ord('+'): '-', ord('('): '-', ord(')'): '-'}
return self.trim_hyphens(lic.translate(conversion_table))

@staticmethod
def modify_name_if_native(dep, is_native):
"""
Expand Down Expand Up @@ -399,12 +394,11 @@ def get_recipe_text(self, distributor):
# license
self.get_license_line()
if isinstance(self.license, str):
ret += 'LICENSE = "%s"\n' % self.translate_license(
get_license(self.license))
ret += 'LICENSE = "%s"\n' % get_license(self.license)
elif isinstance(self.license, list):
ret += 'LICENSE = "'
ret += ' & '.join([self.translate_license(
get_license(lic)) for lic in self.license]) + '"\n'
ret += ' & '.join([get_license(lic) for lic in self.license])
ret += '"\n'
ret += 'LIC_FILES_CHKSUM = "file://package.xml;beginline='
ret += str(self.license_line)
ret += ';endline='
Expand Down

0 comments on commit cbf552a

Please sign in to comment.