mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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>
This commit is contained in:
@@ -607,16 +607,3 @@ python do_packagedata_setscene () {
|
||||
}
|
||||
addtask do_packagedata_setscene
|
||||
|
||||
#
|
||||
# Helper functions for the package writing classes
|
||||
#
|
||||
|
||||
def mapping_rename_hook(d):
|
||||
"""
|
||||
Rewrite variables to account for package renaming in things
|
||||
like debian.bbclass or manual PKG variable name changes
|
||||
"""
|
||||
pkg = d.getVar("PKG")
|
||||
oe.packagedata.runtime_mapping_rename("RDEPENDS", pkg, d)
|
||||
oe.packagedata.runtime_mapping_rename("RRECOMMENDS", pkg, d)
|
||||
oe.packagedata.runtime_mapping_rename("RSUGGESTS", pkg, d)
|
||||
|
||||
@@ -174,7 +174,7 @@ def deb_write_pkg(pkg, d):
|
||||
ctrlfile.write(custom_fields_chunk)
|
||||
ctrlfile.write("\n")
|
||||
|
||||
mapping_rename_hook(localdata)
|
||||
oe.packagedata.mapping_rename_hook(localdata)
|
||||
|
||||
def debian_cmp_remap(var):
|
||||
# dpkg does not allow for '(', ')' or ':' in a dependency name
|
||||
|
||||
@@ -167,7 +167,7 @@ def ipk_write_pkg(pkg, d):
|
||||
ctrlfile.write(custom_fields_chunk)
|
||||
ctrlfile.write("\n")
|
||||
|
||||
mapping_rename_hook(localdata)
|
||||
oe.packagedata.mapping_rename_hook(localdata)
|
||||
|
||||
def debian_cmp_remap(var):
|
||||
# In debian '>' and '<' do not mean what it appears they mean
|
||||
|
||||
@@ -365,7 +365,7 @@ python write_specfile () {
|
||||
translate_vers('RCONFLICTS', localdata)
|
||||
|
||||
# Map the dependencies into their final form
|
||||
mapping_rename_hook(localdata)
|
||||
oe.packagedata.mapping_rename_hook(localdata)
|
||||
|
||||
splitrdepends = localdata.getVar('RDEPENDS') or ""
|
||||
splitrrecommends = localdata.getVar('RRECOMMENDS') or ""
|
||||
|
||||
@@ -340,4 +340,12 @@ fi
|
||||
and not bb.data.inherits_class('packagegroup', d):
|
||||
write_extra_runtime_pkgs(global_variants, packages, pkgdatadir)
|
||||
|
||||
|
||||
def mapping_rename_hook(d):
|
||||
"""
|
||||
Rewrite variables to account for package renaming in things
|
||||
like debian.bbclass or manual PKG variable name changes
|
||||
"""
|
||||
pkg = d.getVar("PKG")
|
||||
oe.packagedata.runtime_mapping_rename("RDEPENDS", pkg, d)
|
||||
oe.packagedata.runtime_mapping_rename("RRECOMMENDS", pkg, d)
|
||||
oe.packagedata.runtime_mapping_rename("RSUGGESTS", pkg, d)
|
||||
|
||||
Reference in New Issue
Block a user