diff options
author | Phil Blundell <philb@gnu.org> | 2004-08-29 21:55:16 +0000 |
---|---|---|
committer | Phil Blundell <philb@gnu.org> | 2004-08-29 21:55:16 +0000 |
commit | 3d96610c7983939473219f2b1982ec40259b5840 (patch) | |
tree | e5cb58a3f86ff942810b46bacac4b092d3e11cf6 | |
parent | 0f9cf0ff26ba3df164267b23c28b23f496537a7f (diff) |
do_split_packages(): add 'prepend' argument; allow aux_files_pattern to be a list
BKrev: 413250c4JWztMCddQ5pJeRFRDshvkQ
-rw-r--r-- | classes/package.oeclass | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/classes/package.oeclass b/classes/package.oeclass index 83257a57fc..cdebea9c6b 100644 --- a/classes/package.oeclass +++ b/classes/package.oeclass @@ -1,7 +1,7 @@ def legitimize_package_name(s): return s.lower().replace('_', '-').replace('@', '+').replace(',', '+') -def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None, postrm=None, allow_dirs=False): +def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None, postrm=None, allow_dirs=False, prepend=False): import os, os.path, oe dvar = oe.data.getVar('D', d, 1) @@ -43,11 +43,18 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst on = legitimize_package_name(m.group(1)) pkg = output_pattern % on if not pkg in packages: - packages.append(pkg) - if aux_files_pattern: - oe.data.setVar('FILES_' + pkg, "%s %s" % (os.path.join(root, o), aux_files_pattern % on), d) + if prepend: + packages = [pkg] + packages else: - oe.data.setVar('FILES_' + pkg, os.path.join(root, o), d) + packages.append(pkg) + the_files = [os.path.join(root, o)] + if aux_files_pattern: + if type(aux_files_pattern) is list: + for fp in aux_files_pattern: + the_files.append(fp % on) + else: + the_files.append(aux_files_pattern % on) + oe.data.setVar('FILES_' + pkg, " ".join(the_files), d) if extra_depends != '': oe.data.setVar('RDEPENDS_' + pkg, extra_depends, d) oe.data.setVar('DESCRIPTION_' + pkg, description % on, d) |