# HG changeset patch # User Antoine Bodin # Date 1298587862 -3600 # Node ID 8cff0e3c661eedb45c321156de2627bf96a08bdb # Parent 9e17dfffe734fca5c5f3e6e5382e21aa410945aa Add --root-config option to install/get-install: Use lib & cache from $root instead of main system (usefull to install using other repositories than thoses defined on host). (4.3) diff -r 9e17dfffe734 -r 8cff0e3c661e tazpkg --- a/tazpkg Fri Mar 04 03:31:16 2011 +0100 +++ b/tazpkg Thu Feb 24 23:51:02 2011 +0100 @@ -1752,12 +1752,22 @@ # Get repositories priority list. look_for_priority - get_options_list="root forced list" + get_options_list="root forced list root-config" get_options + [ "$root" ] && ROOT="$root" && check_base_dir "$root" + [ "$list" ] && INSTALL_LIST="$list" + if [ "$root-config" ]; then + if [ "$root" ]; then + CACHE_DIR=$root/$CACHE_DIR + LOCALSTATE=$root/$LOCALSTATE + INSTALLED=$root/$INSTALLED + else + echo "root-config needs --root= option used." >&2 + exit 1 + fi + fi # Check if forced install. - [ "$root" ] && ROOT="$root" && check_dir "$root" - [ "$list" ] && INSTALL_LIST="$list" if ! [ "$forced" ]; then check_for_installed_package $ROOT fi @@ -2615,13 +2625,23 @@ # Get repositories priority list. look_for_priority - get_options_list="root forced list" + get_options_list="root forced list root-config" get_options DO_CHECK="" [ "$forced" ] && DO_CHECK=no - [ "$root" ] && ROOT="$root" && check_dir "$root" + [ "$root" ] && ROOT="$root" && check_base_dir "$root" [ "$list" ] && INSTALL_LIST="$list" + if [ "$root-config" ]; then + if [ "$root" ]; then + CACHE_DIR=$root/$CACHE_DIR + LOCALSTATE=$root/$LOCALSTATE + INSTALLED=$root/$INSTALLED + else + echo "root-config needs --root= option used." >&2 + exit 1 + fi + fi AUTOEXEC="no" if ! check_for_package_in_list check; then PACKAGE=get-$PACKAGE