# HG changeset patch # User Antoine Bodin # Date 1301622227 -7200 # Node ID 005867d1ffdd96bf69a082fda2d128c2eca50bc2 # Parent 27d053dfc95c6a0303c18dd030d90e4366818163 bugfix diff -r 27d053dfc95c -r 005867d1ffdd tazpkg --- a/tazpkg Fri Mar 25 18:22:11 2011 +0100 +++ b/tazpkg Fri Apr 01 03:43:47 2011 +0200 @@ -2229,13 +2229,20 @@ # Recharge packages.list from a mirror. # check_root - if [ "$2" = main ]; then + get_options_list="root forced list rootconfig" + get_options + ARG=$2 + if [ "$root" ]; then + LOCALSTATE=$root$LOCALSTATE + [ "${2#--}" != "$2" ] && ARG=$3 + fi + if [ "$ARG" = main ]; then repository_to_recharge=$LOCALSTATE - elif [ "$2" ]; then - if [ -d "$LOCALSTATE/undigest/$2" ]; then - repository_to_recharge=$LOCALSTATE/undigest/$2 + elif [ "$ARG" ]; then + if [ -d "$LOCALSTATE/undigest/$ARG" ]; then + repository_to_recharge=$LOCALSTATE/undigest/$ARG else - echo "\$LOCALSTATE/undigest/$2 `gettext \"doesn't exists.\"`" >&2 + echo "\$LOCALSTATE/undigest/$ARG `gettext \"doesn't exists.\"`" >&2 exit 1 fi else @@ -2718,6 +2725,7 @@ download $PACKAGE.tazpkg fi PACKAGE_FILE=$CACHE_DIR/$PACKAGE.tazpkg + [ "$rootconfig" ] && LOCALSTATE=${LOCALSTATE#$root} install_package $ROOT [ "$AUTOEXEC" != "no" ] && $PACKAGE $ROOT update_desktop_database $ROOT