From 68941a9a319faaf3054a9e0d462fa951cb8c68d2 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 27 Dec 2008 16:20:54 +0100 Subject: [PATCH] Introduce $install_priority for use in templates. A higher number in this var will make the binary package to be installed before other with lower priority. By default, all packages have a 0 priority. xbps-base-dirs uses 100, because it needs to be one of the first installed packages. --HG-- extra : convert_revision : 81a88b676d2ae3180914612371619f19e1765d02 --- shutils/binpkg.sh | 9 +++++++++ shutils/tmpl_funcs.sh | 1 + templates/xbps-base-dirs.tmpl | 1 + 3 files changed, 11 insertions(+) diff --git a/shutils/binpkg.sh b/shutils/binpkg.sh index 0fcfa32b188..f91fd07dac4 100644 --- a/shutils/binpkg.sh +++ b/shutils/binpkg.sh @@ -31,12 +31,19 @@ xbps_write_metadata_pkg() { local destdir=$XBPS_DESTDIR/$pkgname-$version local metadir=$destdir/var/cache/xbps/metadata/$pkgname + local prioinst= if [ ! -d "$destdir" ]; then echo "ERROR: $pkgname not installed into destdir." exit 1 fi + if [ -n "$priority" ]; then + prioinst=$install_priority + else + prioinst=0 + fi + # Write the files list. local TMPFLIST=$(mktemp -t flist.XXXXXXXXXX) || exit 1 find $destdir | sort -ur | \ @@ -56,6 +63,8 @@ xbps_write_metadata_pkg() $version architecture $xbps_machine + priority + $prioinst installed_size $(du -sb $destdir|awk '{print $1}') maintainer diff --git a/shutils/tmpl_funcs.sh b/shutils/tmpl_funcs.sh index 4fc2e1834a9..99896460b63 100644 --- a/shutils/tmpl_funcs.sh +++ b/shutils/tmpl_funcs.sh @@ -68,6 +68,7 @@ reset_tmpl_vars() build_depends libtool_fixup_la_stage no_fixup_libtool \ disable_parallel_build run_depends cross_compiler \ only_for_archs patch_args conf_files keep_dirs \ + install_priority \ XBPS_EXTRACT_DONE XBPS_CONFIGURE_DONE \ XBPS_BUILD_DONE XBPS_INSTALL_DONE" diff --git a/templates/xbps-base-dirs.tmpl b/templates/xbps-base-dirs.tmpl index 0664969eabc..31f03d8d1c5 100644 --- a/templates/xbps-base-dirs.tmpl +++ b/templates/xbps-base-dirs.tmpl @@ -8,6 +8,7 @@ long_desc=" This package installs the base system directories." base_chroot=yes +install_priority=100 do_install() {