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:
parent
74e575f984
commit
68941a9a31
3 changed files with 11 additions and 0 deletions
|
@ -31,12 +31,19 @@ xbps_write_metadata_pkg()
|
||||||
{
|
{
|
||||||
local destdir=$XBPS_DESTDIR/$pkgname-$version
|
local destdir=$XBPS_DESTDIR/$pkgname-$version
|
||||||
local metadir=$destdir/var/cache/xbps/metadata/$pkgname
|
local metadir=$destdir/var/cache/xbps/metadata/$pkgname
|
||||||
|
local prioinst=
|
||||||
|
|
||||||
if [ ! -d "$destdir" ]; then
|
if [ ! -d "$destdir" ]; then
|
||||||
echo "ERROR: $pkgname not installed into destdir."
|
echo "ERROR: $pkgname not installed into destdir."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$priority" ]; then
|
||||||
|
prioinst=$install_priority
|
||||||
|
else
|
||||||
|
prioinst=0
|
||||||
|
fi
|
||||||
|
|
||||||
# Write the files list.
|
# Write the files list.
|
||||||
local TMPFLIST=$(mktemp -t flist.XXXXXXXXXX) || exit 1
|
local TMPFLIST=$(mktemp -t flist.XXXXXXXXXX) || exit 1
|
||||||
find $destdir | sort -ur | \
|
find $destdir | sort -ur | \
|
||||||
|
@ -56,6 +63,8 @@ xbps_write_metadata_pkg()
|
||||||
<string>$version</string>
|
<string>$version</string>
|
||||||
<key>architecture</key>
|
<key>architecture</key>
|
||||||
<string>$xbps_machine</string>
|
<string>$xbps_machine</string>
|
||||||
|
<key>priority</key>
|
||||||
|
<integer>$prioinst</integer>
|
||||||
<key>installed_size</key>
|
<key>installed_size</key>
|
||||||
<integer>$(du -sb $destdir|awk '{print $1}')</integer>
|
<integer>$(du -sb $destdir|awk '{print $1}')</integer>
|
||||||
<key>maintainer</key>
|
<key>maintainer</key>
|
||||||
|
|
|
@ -68,6 +68,7 @@ reset_tmpl_vars()
|
||||||
build_depends libtool_fixup_la_stage no_fixup_libtool \
|
build_depends libtool_fixup_la_stage no_fixup_libtool \
|
||||||
disable_parallel_build run_depends cross_compiler \
|
disable_parallel_build run_depends cross_compiler \
|
||||||
only_for_archs patch_args conf_files keep_dirs \
|
only_for_archs patch_args conf_files keep_dirs \
|
||||||
|
install_priority \
|
||||||
XBPS_EXTRACT_DONE XBPS_CONFIGURE_DONE \
|
XBPS_EXTRACT_DONE XBPS_CONFIGURE_DONE \
|
||||||
XBPS_BUILD_DONE XBPS_INSTALL_DONE"
|
XBPS_BUILD_DONE XBPS_INSTALL_DONE"
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ long_desc="
|
||||||
This package installs the base system directories."
|
This package installs the base system directories."
|
||||||
|
|
||||||
base_chroot=yes
|
base_chroot=yes
|
||||||
|
install_priority=100
|
||||||
|
|
||||||
do_install()
|
do_install()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue