From 1cf57eab23f3a3bf7a544acb4a2db5ae76a2a8e1 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 9 Jul 2011 23:07:50 +0200 Subject: [PATCH] xbps-src: reserve "kernel_hooks_version" variable. This variable can be used in templates to specify the kernel version passed to the Vanilla kernel hooks in /etc/kernel.d/. --- xbps-src/shutils/metadata.sh | 2 +- xbps-src/shutils/metadata_scripts.sh | 8 ++++++++ xbps-src/shutils/tmpl_funcs.sh.in | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/xbps-src/shutils/metadata.sh b/xbps-src/shutils/metadata.sh index 13f7098b51..e7dbbc3d75 100644 --- a/xbps-src/shutils/metadata.sh +++ b/xbps-src/shutils/metadata.sh @@ -47,7 +47,7 @@ xbps_write_metadata_pkg() preserve keep_empty_dirs xml_entries sgml_entries \ xml_catalogs sgml_catalogs gconf_entries gconf_schemas \ gtk_iconcache_dirs font_dirs dkms_modules provides \ - conflicts + kernel_hooks_version conflicts . $XBPS_SRCPKGDIR/${sourcepkg}/${subpkg}.template pkgname=${subpkg} set_tmpl_common_vars diff --git a/xbps-src/shutils/metadata_scripts.sh b/xbps-src/shutils/metadata_scripts.sh index b871d65208..466bd8f160 100644 --- a/xbps-src/shutils/metadata_scripts.sh +++ b/xbps-src/shutils/metadata_scripts.sh @@ -76,6 +76,14 @@ UPDATE="\$4" # _EOF + # + # Handle kernel hooks. + # + if [ -n "${kernel_hooks_version}" ]; then + _add_trigger kernel + echo "export kernel_hooks_version=\"${kernel_hooks_version}\"" >> $tmpf + fi + # # Handle DKMS modules. # diff --git a/xbps-src/shutils/tmpl_funcs.sh.in b/xbps-src/shutils/tmpl_funcs.sh.in index 0be7cdc7cb..ea6d3ba052 100644 --- a/xbps-src/shutils/tmpl_funcs.sh.in +++ b/xbps-src/shutils/tmpl_funcs.sh.in @@ -105,7 +105,7 @@ reset_tmpl_vars() ignore_vdeps_dir noverifyrdeps conflicts dkms_modules \ gconf_entries gconf_schemas stow_copy stow_copy_files \ pre_remove post_remove post_stow do_build do_install \ - homepage license \ + homepage license kernel_hooks_version \ XBPS_EXTRACT_DONE XBPS_CONFIGURE_DONE \ XBPS_BUILD_DONE XBPS_INSTALL_DONE FILESDIR DESTDIR \ SRCPKGDESTDIR PATCHESDIR CFLAGS CXXFLAGS CPPFLAGS \