diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:56:32 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:56:32 +0000 |
commit | b2e465d6d32d2dc884f58b94acb7e35f671a87fe (patch) | |
tree | 5928383b9bde7b0ba9812e6526ad746466e558f7 /dselect/update | |
parent | 00b47c98ca4a4349686a082eba6d77decbb03a4d (diff) |
Join with aliencode
Author: jgg
Date: 2001-02-20 07:03:16 GMT
Join with aliencode
Diffstat (limited to 'dselect/update')
-rwxr-xr-x | dselect/update | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/dselect/update b/dselect/update index 9195912ea..a61086d79 100755 --- a/dselect/update +++ b/dselect/update @@ -6,12 +6,15 @@ OPTS="-f" APTGET="/usr/bin/apt-get" APTCACHE="/usr/bin/apt-cache" DPKG="/usr/bin/dpkg" +DPKG_OPTS="--admindir=$1" +APT_OPT0="-oDir::State::status=$1/status" +APT_OPT1="-oDPkg::Options::=$DPKG_OPTS" CACHEDIR="/var/cache/apt" -PROMPT="no" +PROMPT="false" RES=`apt-config shell OPTS DSelect::UpdateOptions \ - DPKG Dir::Bin::dpkg APTGET Dir::Bin::apt-get \ - APTCACHE Dir::Bin::apt-cache CACHEDIR Dir::Cache \ - PROMPT DSelect::PromptAfterUpdate` + DPKG Dir::Bin::dpkg/f APTGET Dir::Bin::apt-get/f \ + APTCACHE Dir::Bin::apt-cache/f CACHEDIR Dir::Cache/d \ + PROMPT DSelect::PromptAfterUpdate/b` eval $RES # It looks slightly ugly to have a double / in the dpkg output @@ -19,16 +22,16 @@ CACHEDIR=`echo $CACHEDIR | sed -e "s|/$||"` set +e FAILED=0 -$APTGET $OPTS update || FAILED=1 +$APTGET $OPTS "$APT_OPT0" "$APT_OPT1" update || FAILED=1 set -e echo "Merging Available information" rm -f $CACHEDIR/available $APTCACHE dumpavail > $CACHEDIR/available -$DPKG --update-avail $CACHEDIR/available +$DPKG "$DPKG_OPTS" --update-avail $CACHEDIR/available rm -f $CACHEDIR/available -if [ $PROMPT = "yes" ]; then +if [ x$PROMPT = "xtrue" ]; then echo "Press enter to continue." && read RES; fi |