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
This commit is contained in:
Juan RP 2008-12-27 16:20:54 +01:00
parent 74e575f984
commit 68941a9a31
3 changed files with 11 additions and 0 deletions

View file

@ -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()
<string>$version</string>
<key>architecture</key>
<string>$xbps_machine</string>
<key>priority</key>
<integer>$prioinst</integer>
<key>installed_size</key>
<integer>$(du -sb $destdir|awk '{print $1}')</integer>
<key>maintainer</key>

View file

@ -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"

View file

@ -8,6 +8,7 @@ long_desc="
This package installs the base system directories."
base_chroot=yes
install_priority=100
do_install()
{