Merge pull request #31656 from DaanDeMeyer/meson

meson: Remove version_h dependency from jinja2_cmdline
This commit is contained in:
Daan De Meyer
2024-03-06 16:20:13 +01:00
committed by GitHub
4 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -1887,7 +1887,7 @@ config_h = configure_file(
userspace_c_args += ['-include', 'config.h']
jinja2_cmdline = [meson_render_jinja2, config_h, version_h]
jinja2_cmdline = [meson_render_jinja2, config_h]
userspace = declare_dependency(
compile_args : userspace_c_args,
+1 -1
View File
@@ -27,7 +27,7 @@ from shutil import which
from pathlib import Path
from typing import Optional
__version__ = '{{PROJECT_VERSION_FULL}} ({{GIT_VERSION}})'
__version__ = '{{PROJECT_VERSION_FULL}} ({{VERSION_TAG}})'
try:
VERBOSE = int(os.environ['KERNEL_INSTALL_VERBOSE']) > 0
+1 -1
View File
@@ -181,7 +181,7 @@ mkdir -p "${LOADER_ENTRY%/*}" || {
[ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "Creating $LOADER_ENTRY"
{
echo "# Boot Loader Specification type#1 entry"
echo "# File created by $0 (systemd {{GIT_VERSION}})"
echo "# File created by $0 (systemd {{VERSION_TAG}})"
echo "title $PRETTY_NAME $KERNEL_VERSION"
echo "version $KERNEL_VERSION"
if [ "$ENTRY_TOKEN" = "$MACHINE_ID" ]; then
+4 -5
View File
@@ -33,12 +33,11 @@ def render(filename, defines):
def main():
defines = parse_config_h(sys.argv[1])
defines.update(parse_config_h(sys.argv[2]))
output = render(sys.argv[3], defines)
with open(sys.argv[4], 'w') as f:
output = render(sys.argv[2], defines)
with open(sys.argv[3], 'w') as f:
f.write(output)
info = os.stat(sys.argv[3])
os.chmod(sys.argv[4], info.st_mode)
info = os.stat(sys.argv[2])
os.chmod(sys.argv[3], info.st_mode)
if __name__ == '__main__':
main()