diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-07-28 23:28:15 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-02 15:44:10 +0100 |
commit | bb6ddc3691ab04162ec5fd69a2d5e7876713fd15 (patch) | |
tree | 76e376b01253c3aace1a98a5021bcaad3c92e861 /meta/classes/kernel-module-split.bbclass | |
parent | fcc456ee4b8f619134abb4649db53c638074082c (diff) | |
download | poky-bb6ddc3691ab04162ec5fd69a2d5e7876713fd15.tar.gz |
Convert to new override syntax
This is the result of automated script conversion:
scripts/contrib/convert-overrides.py <oe-core directory>
converting the metadata to use ":" as the override character instead of "_".
(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel-module-split.bbclass')
-rw-r--r-- | meta/classes/kernel-module-split.bbclass | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass index baa32e0a90..b56dd4a9c7 100644 --- a/meta/classes/kernel-module-split.bbclass +++ b/meta/classes/kernel-module-split.bbclass | |||
@@ -1,4 +1,4 @@ | |||
1 | pkg_postinst_modules () { | 1 | pkg_postinst:modules () { |
2 | if [ -z "$D" ]; then | 2 | if [ -z "$D" ]; then |
3 | depmod -a ${KERNEL_VERSION} | 3 | depmod -a ${KERNEL_VERSION} |
4 | else | 4 | else |
@@ -8,7 +8,7 @@ else | |||
8 | fi | 8 | fi |
9 | } | 9 | } |
10 | 10 | ||
11 | pkg_postrm_modules () { | 11 | pkg_postrm:modules () { |
12 | if [ -z "$D" ]; then | 12 | if [ -z "$D" ]; then |
13 | depmod -a ${KERNEL_VERSION} | 13 | depmod -a ${KERNEL_VERSION} |
14 | else | 14 | else |
@@ -24,11 +24,11 @@ fi | |||
24 | 24 | ||
25 | PACKAGE_WRITE_DEPS += "kmod-native depmodwrapper-cross" | 25 | PACKAGE_WRITE_DEPS += "kmod-native depmodwrapper-cross" |
26 | 26 | ||
27 | do_install_append() { | 27 | do_install:append() { |
28 | install -d ${D}${sysconfdir}/modules-load.d/ ${D}${sysconfdir}/modprobe.d/ | 28 | install -d ${D}${sysconfdir}/modules-load.d/ ${D}${sysconfdir}/modprobe.d/ |
29 | } | 29 | } |
30 | 30 | ||
31 | PACKAGESPLITFUNCS_prepend = "split_kernel_module_packages " | 31 | PACKAGESPLITFUNCS:prepend = "split_kernel_module_packages " |
32 | 32 | ||
33 | KERNEL_MODULES_META_PACKAGE ?= "${@ d.getVar("KERNEL_PACKAGE_NAME") or "kernel" }-modules" | 33 | KERNEL_MODULES_META_PACKAGE ?= "${@ d.getVar("KERNEL_PACKAGE_NAME") or "kernel" }-modules" |
34 | 34 | ||
@@ -100,11 +100,11 @@ python split_kernel_module_packages () { | |||
100 | else: | 100 | else: |
101 | f.write('%s\n' % basename) | 101 | f.write('%s\n' % basename) |
102 | f.close() | 102 | f.close() |
103 | postinst = d.getVar('pkg_postinst_%s' % pkg) | 103 | postinst = d.getVar('pkg_postinst:%s' % pkg) |
104 | if not postinst: | 104 | if not postinst: |
105 | bb.fatal("pkg_postinst_%s not defined" % pkg) | 105 | bb.fatal("pkg_postinst:%s not defined" % pkg) |
106 | postinst += d.getVar('autoload_postinst_fragment') % (autoload or basename) | 106 | postinst += d.getVar('autoload_postinst_fragment') % (autoload or basename) |
107 | d.setVar('pkg_postinst_%s' % pkg, postinst) | 107 | d.setVar('pkg_postinst:%s' % pkg, postinst) |
108 | 108 | ||
109 | # Write out any modconf fragment | 109 | # Write out any modconf fragment |
110 | modconflist = (d.getVar("KERNEL_MODULE_PROBECONF") or "").split() | 110 | modconflist = (d.getVar("KERNEL_MODULE_PROBECONF") or "").split() |
@@ -117,19 +117,19 @@ python split_kernel_module_packages () { | |||
117 | elif modconf: | 117 | elif modconf: |
118 | bb.error("Please ensure module %s is listed in KERNEL_MODULE_PROBECONF since module_conf_%s is set" % (basename, basename)) | 118 | bb.error("Please ensure module %s is listed in KERNEL_MODULE_PROBECONF since module_conf_%s is set" % (basename, basename)) |
119 | 119 | ||
120 | files = d.getVar('FILES_%s' % pkg) | 120 | files = d.getVar('FILES:%s' % pkg) |
121 | files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename) | 121 | files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename) |
122 | d.setVar('FILES_%s' % pkg, files) | 122 | d.setVar('FILES:%s' % pkg, files) |
123 | 123 | ||
124 | conffiles = d.getVar('CONFFILES_%s' % pkg) | 124 | conffiles = d.getVar('CONFFILES:%s' % pkg) |
125 | conffiles = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (conffiles, basename, basename) | 125 | conffiles = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (conffiles, basename, basename) |
126 | d.setVar('CONFFILES_%s' % pkg, conffiles) | 126 | d.setVar('CONFFILES:%s' % pkg, conffiles) |
127 | 127 | ||
128 | if "description" in vals: | 128 | if "description" in vals: |
129 | old_desc = d.getVar('DESCRIPTION_' + pkg) or "" | 129 | old_desc = d.getVar('DESCRIPTION:' + pkg) or "" |
130 | d.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"]) | 130 | d.setVar('DESCRIPTION:' + pkg, old_desc + "; " + vals["description"]) |
131 | 131 | ||
132 | rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg) or "") | 132 | rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS:' + pkg) or "") |
133 | modinfo_deps = [] | 133 | modinfo_deps = [] |
134 | if "depends" in vals and vals["depends"] != "": | 134 | if "depends" in vals and vals["depends"] != "": |
135 | for dep in vals["depends"].split(","): | 135 | for dep in vals["depends"].split(","): |
@@ -139,16 +139,16 @@ python split_kernel_module_packages () { | |||
139 | for dep in modinfo_deps: | 139 | for dep in modinfo_deps: |
140 | if not dep in rdepends: | 140 | if not dep in rdepends: |
141 | rdepends[dep] = [] | 141 | rdepends[dep] = [] |
142 | d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False)) | 142 | d.setVar('RDEPENDS:' + pkg, bb.utils.join_deps(rdepends, commasep=False)) |
143 | 143 | ||
144 | # Avoid automatic -dev recommendations for modules ending with -dev. | 144 | # Avoid automatic -dev recommendations for modules ending with -dev. |
145 | d.setVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs', 1) | 145 | d.setVarFlag('RRECOMMENDS:' + pkg, 'nodeprrecs', 1) |
146 | 146 | ||
147 | # Provide virtual package without postfix | 147 | # Provide virtual package without postfix |
148 | providevirt = d.getVar('KERNEL_MODULE_PROVIDE_VIRTUAL') | 148 | providevirt = d.getVar('KERNEL_MODULE_PROVIDE_VIRTUAL') |
149 | if providevirt == "1": | 149 | if providevirt == "1": |
150 | postfix = format.split('%s')[1] | 150 | postfix = format.split('%s')[1] |
151 | d.setVar('RPROVIDES_' + pkg, pkg.replace(postfix, '')) | 151 | d.setVar('RPROVIDES:' + pkg, pkg.replace(postfix, '')) |
152 | 152 | ||
153 | kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME") or "kernel" | 153 | kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME") or "kernel" |
154 | kernel_version = d.getVar("KERNEL_VERSION") | 154 | kernel_version = d.getVar("KERNEL_VERSION") |
@@ -159,13 +159,13 @@ python split_kernel_module_packages () { | |||
159 | module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX') | 159 | module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX') |
160 | module_pattern = module_pattern_prefix + kernel_package_name + '-module-%s' + module_pattern_suffix | 160 | module_pattern = module_pattern_prefix + kernel_package_name + '-module-%s' + module_pattern_suffix |
161 | 161 | ||
162 | postinst = d.getVar('pkg_postinst_modules') | 162 | postinst = d.getVar('pkg_postinst:modules') |
163 | postrm = d.getVar('pkg_postrm_modules') | 163 | postrm = d.getVar('pkg_postrm:modules') |
164 | 164 | ||
165 | modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%s-%s' % (kernel_package_name, kernel_version)) | 165 | modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%s-%s' % (kernel_package_name, kernel_version)) |
166 | if modules: | 166 | if modules: |
167 | metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE') | 167 | metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE') |
168 | d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules)) | 168 | d.appendVar('RDEPENDS:' + metapkg, ' '+' '.join(modules)) |
169 | 169 | ||
170 | # If modules-load.d and modprobe.d are empty at this point, remove them to | 170 | # If modules-load.d and modprobe.d are empty at this point, remove them to |
171 | # avoid warnings. removedirs only raises an OSError if an empty | 171 | # avoid warnings. removedirs only raises an OSError if an empty |