xbps-src: new target: bootstrap-update.

This target will update the bootstrap packages in masterdir
(if it was installed thru binary packages) to the most newer
version available in registered repositories.
This commit is contained in:
Juan RP 2011-10-20 18:31:16 +02:00
parent 8211ebbce8
commit b1dcc3623a
2 changed files with 13 additions and 5 deletions

View file

@ -272,11 +272,7 @@ xbps_chroot_handler()
{
local action="$1" pkg="$2" rv=0 arg
[ -z "$action" -o -z "$pkg" ] && return 1
[ "$action" != "configure" -a "$action" != "build" -a \
"$action" != "install" -a "$action" != "chroot" -a \
"$action" != "remove" ] && return 1
[ -z "$action" -a -z "$pkg" ] && return 1
if [ ! -f $XBPS_MASTERDIR/.xbps_perms_done ]; then
echo -n "==> Preparing chroot on $XBPS_MASTERDIR... "

View file

@ -63,6 +63,11 @@ Targets:
bootstrap
Build and install from source the bootstrap packages into <masterdir>.
bootstrap-update
Updates bootstrap packages with latest versions available from registered
repositories in the XBPS configuration file, by default set to
<masterdir>/usr/local/etc/xbps-conf.plist.
build [pkgname]
Build package source (fetch + extract + configure + build).
@ -350,6 +355,13 @@ bootstrap)
cd $XBPS_SRCPKGDIR/base-chroot && _ORIGINPKG="$(basename_cwd)"
setup_tmpl ${_ORIGINPKG} && install_pkg $pkgname
;;
bootstrap-update)
if [ -z "$IN_CHROOT" ]; then
xbps_chroot_handler ${target} dummy
else
${fakeroot_cmd} ${fakeroot_cmd_args} ${XBPS_BIN_CMD} -y autoupdate
fi
;;
build|configure)
if [ -z "${_pkgname}" ]; then
[ ! -r ./template ] && msg_error "missing build template in $(pwd).\n"