diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-04 14:20:37 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-05 11:52:50 +0000 |
commit | 99de12f152413c1cb942eac26082d6795a285151 (patch) | |
tree | 550adb431fcc2b979fa07fa58eca5542192c37ab /meta/classes-global | |
parent | ab8c9d503eca4cbb4e72d17a3418de222c34d305 (diff) | |
download | poky-99de12f152413c1cb942eac26082d6795a285151.tar.gz |
package: Move mapping_rename_hook to packagedata function library
This function is used by the packaging tasks/classes and makes much
more sense in the packagedata function library.
(From OE-Core rev: 7a512a8803101310772d83836e6b78ebaf8121de)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global')
-rw-r--r-- | meta/classes-global/package.bbclass | 13 | ||||
-rw-r--r-- | meta/classes-global/package_deb.bbclass | 2 | ||||
-rw-r--r-- | meta/classes-global/package_ipk.bbclass | 2 | ||||
-rw-r--r-- | meta/classes-global/package_rpm.bbclass | 2 |
4 files changed, 3 insertions, 16 deletions
diff --git a/meta/classes-global/package.bbclass b/meta/classes-global/package.bbclass index 5c250776f8..d334da6fb3 100644 --- a/meta/classes-global/package.bbclass +++ b/meta/classes-global/package.bbclass | |||
@@ -607,16 +607,3 @@ python do_packagedata_setscene () { | |||
607 | } | 607 | } |
608 | addtask do_packagedata_setscene | 608 | addtask do_packagedata_setscene |
609 | 609 | ||
610 | # | ||
611 | # Helper functions for the package writing classes | ||
612 | # | ||
613 | |||
614 | def mapping_rename_hook(d): | ||
615 | """ | ||
616 | Rewrite variables to account for package renaming in things | ||
617 | like debian.bbclass or manual PKG variable name changes | ||
618 | """ | ||
619 | pkg = d.getVar("PKG") | ||
620 | oe.packagedata.runtime_mapping_rename("RDEPENDS", pkg, d) | ||
621 | oe.packagedata.runtime_mapping_rename("RRECOMMENDS", pkg, d) | ||
622 | oe.packagedata.runtime_mapping_rename("RSUGGESTS", pkg, d) | ||
diff --git a/meta/classes-global/package_deb.bbclass b/meta/classes-global/package_deb.bbclass index 99e377b455..5aba3837bd 100644 --- a/meta/classes-global/package_deb.bbclass +++ b/meta/classes-global/package_deb.bbclass | |||
@@ -174,7 +174,7 @@ def deb_write_pkg(pkg, d): | |||
174 | ctrlfile.write(custom_fields_chunk) | 174 | ctrlfile.write(custom_fields_chunk) |
175 | ctrlfile.write("\n") | 175 | ctrlfile.write("\n") |
176 | 176 | ||
177 | mapping_rename_hook(localdata) | 177 | oe.packagedata.mapping_rename_hook(localdata) |
178 | 178 | ||
179 | def debian_cmp_remap(var): | 179 | def debian_cmp_remap(var): |
180 | # dpkg does not allow for '(', ')' or ':' in a dependency name | 180 | # dpkg does not allow for '(', ')' or ':' in a dependency name |
diff --git a/meta/classes-global/package_ipk.bbclass b/meta/classes-global/package_ipk.bbclass index 9b75f5cf1c..b4b7bc9ac2 100644 --- a/meta/classes-global/package_ipk.bbclass +++ b/meta/classes-global/package_ipk.bbclass | |||
@@ -167,7 +167,7 @@ def ipk_write_pkg(pkg, d): | |||
167 | ctrlfile.write(custom_fields_chunk) | 167 | ctrlfile.write(custom_fields_chunk) |
168 | ctrlfile.write("\n") | 168 | ctrlfile.write("\n") |
169 | 169 | ||
170 | mapping_rename_hook(localdata) | 170 | oe.packagedata.mapping_rename_hook(localdata) |
171 | 171 | ||
172 | def debian_cmp_remap(var): | 172 | def debian_cmp_remap(var): |
173 | # In debian '>' and '<' do not mean what it appears they mean | 173 | # In debian '>' and '<' do not mean what it appears they mean |
diff --git a/meta/classes-global/package_rpm.bbclass b/meta/classes-global/package_rpm.bbclass index 16631688b1..85d0bd7fce 100644 --- a/meta/classes-global/package_rpm.bbclass +++ b/meta/classes-global/package_rpm.bbclass | |||
@@ -365,7 +365,7 @@ python write_specfile () { | |||
365 | translate_vers('RCONFLICTS', localdata) | 365 | translate_vers('RCONFLICTS', localdata) |
366 | 366 | ||
367 | # Map the dependencies into their final form | 367 | # Map the dependencies into their final form |
368 | mapping_rename_hook(localdata) | 368 | oe.packagedata.mapping_rename_hook(localdata) |
369 | 369 | ||
370 | splitrdepends = localdata.getVar('RDEPENDS') or "" | 370 | splitrdepends = localdata.getVar('RDEPENDS') or "" |
371 | splitrrecommends = localdata.getVar('RRECOMMENDS') or "" | 371 | splitrrecommends = localdata.getVar('RRECOMMENDS') or "" |