From b1dcc3623a05a4b85557937184638740e9e5e6cc Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 20 Oct 2011 18:31:16 +0200 Subject: [PATCH] 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. --- xbps-src/shutils/chroot.sh.in | 6 +----- xbps-src/xbps-src.sh.in | 12 ++++++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/xbps-src/shutils/chroot.sh.in b/xbps-src/shutils/chroot.sh.in index 79ced14f899..8bb97ff235d 100644 --- a/xbps-src/shutils/chroot.sh.in +++ b/xbps-src/shutils/chroot.sh.in @@ -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... " diff --git a/xbps-src/xbps-src.sh.in b/xbps-src/xbps-src.sh.in index 8875ae01840..ed922cf66e6 100644 --- a/xbps-src/xbps-src.sh.in +++ b/xbps-src/xbps-src.sh.in @@ -63,6 +63,11 @@ Targets: bootstrap Build and install from source the bootstrap packages into . + bootstrap-update + Updates bootstrap packages with latest versions available from registered + repositories in the XBPS configuration file, by default set to + /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"