From 6f65afafa5fab4c60984cd1b5205c3debee41d1c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 18 Jul 2012 09:46:32 +0200 Subject: mklive.sh: added support for xbps >= 0.16.6. --- mklive.sh.in | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'mklive.sh.in') diff --git a/mklive.sh.in b/mklive.sh.in index b51906f..e145fd4 100644 --- a/mklive.sh.in +++ b/mklive.sh.in @@ -240,8 +240,8 @@ if [ -n "$REPOSITORY_CACHE" ]; then fi XBPS_VERSION=$($XBPS_BIN_CMD -V|awk '{print $2}') case $XBPS_VERSION in - # XBPS >= 0.16 - [0-9].[1-9][6-9]*) XBPS_016=1;; + # XBPS >= 0.16.6 + [0-9].[1-9][6-9].[6-9]*) XBPS_016_6=1;; esac info_msg "Redirecting stdout/stderr to $LOGFILE ..." @@ -329,24 +329,18 @@ pkgs=$($XBPS_BIN_CMD -r /tmp/blah -n install base-system grub-x86_64-efi) set -- ${pkgs} while [ $# -ne 0 ]; do pkgn=$1; action=$2; ver=$3; repo=$4; binpkg=$5; arch=$6 - if [ -z "$XBPS_016" ]; then - arch=$(basename $repo) - shift 5 - else - shift 6 - fi + shift 6 mkdir -p $ROOTFS/packages/$arch bpkg=$repo/$arch/$binpkg cp -f $bpkg $ROOTFS/packages/$arch + ln -sfr $ROOTFS/packages/$arch/$binpkg $ROOTFS/packages/$binpkg done -if [ -n "$XBPS_016" ]; then - $XBPS_REPO_CMD genindex $ROOTFS/packages 2>&1 >>$LOGFILE +if [ -n "$XBPS_016_6" ]; then + $XBPS_REPO_CMD index-add $ROOTFS/packages/*.xbps 2>&1 >>$LOGFILE rm -f $ROOTFS/packages/index-files.plist else - for f in $ROOTFS_REPODIR/*; do - ${XBPS_REPO_CMD} genindex $f 2>&1 >>$LOGFILE - rm -f $f/rindex-files.plist - done + ${XBPS_REPO_CMD} genindex $ROOTFS/packages 2>&1 >>$LOGFILE + rm -f $ROOTFS/packages/index-files.plist fi # install lsblk and blkid from util-linux. to avoid installing -- cgit 1.4.1