From 13d43973c918c316a8d71f49e81bbbd59ab6093a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 7 Jun 2009 08:05:17 +0200 Subject: [PATCH] Add the "essential" var for use in templates. This will be used to mark packages that shouldn't be removed if it's being updated, e.g libc. --HG-- extra : convert_revision : bba7d14b2d112edaf17e6adc04a222a3d663da34 --- shutils/metadata.sh | 8 +++++++- shutils/tmpl_funcs.sh | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/shutils/metadata.sh b/shutils/metadata.sh index d2f383e72fd..c44bbcb4e22 100644 --- a/shutils/metadata.sh +++ b/shutils/metadata.sh @@ -60,7 +60,7 @@ xbps_write_metadata_pkg() msg_error "Cannot find subpackage template!" fi unset run_depends conf_files keep_dirs noarch triggers \ - revision openrc_services + revision openrc_services essential . $XBPS_TEMPLATESDIR/${sourcepkg}/${subpkg}.template pkgname=${sourcepkg}-${subpkg} set_tmpl_common_vars @@ -289,6 +289,12 @@ _EOF Add_dependency run OpenRC fi + # Is this an essential pkg? + if [ -n "$essential" ]; then + echo "essential" >> $TMPFPROPS + echo "" >> $TMPFPROPS + fi + # Dependencies if [ -n "$run_depends" ]; then echo "run_depends" >> $TMPFPROPS diff --git a/shutils/tmpl_funcs.sh b/shutils/tmpl_funcs.sh index 1b1fd6e8ea9..6bc88510865 100644 --- a/shutils/tmpl_funcs.sh +++ b/shutils/tmpl_funcs.sh @@ -66,7 +66,7 @@ reset_tmpl_vars() make_build_target configure_script noextract \ pre_configure pre_build pre_install configure_shell \ post_configure post_build post_install \ - make_install_target version revision \ + make_install_target version revision essential \ sgml_catalogs xml_catalogs xml_entries sgml_entries \ build_depends libtool_fixup_la_stage no_fixup_libtool \ disable_parallel_build run_depends cross_compiler \