]>
git.saurik.com Git - apt.git/blob - dselect/update
4 # Get the configuration from /etc/apt/apt.conf
6 APTGET
="/usr/bin/apt-get"
7 APTCACHE
="/usr/bin/apt-cache"
9 DPKG_OPTS
="--admindir=$1"
10 APT_OPT0
="-oDir::State::status=$1/status"
11 APT_OPT1
="-oDPkg::Options::=$DPKG_OPTS"
12 CACHEDIR
="/var/cache/apt"
14 RES
=`apt-config shell OPTS DSelect::UpdateOptions \
15 DPKG Dir::Bin::dpkg/f APTGET Dir::Bin::apt-get/f \
16 APTCACHE Dir::Bin::apt-cache/f CACHEDIR Dir::Cache/d \
17 PROMPT DSelect::PromptAfterUpdate/b`
20 # It looks slightly ugly to have a double / in the dpkg output
21 CACHEDIR
=`echo $CACHEDIR | sed -e "s|/$||"`
25 $APTGET $OPTS "$APT_OPT0" "$APT_OPT1" update
|| FAILED
=1
28 echo "Merging Available information"
29 rm -f $CACHEDIR/available
30 $APTCACHE dumpavail
> $CACHEDIR/available
31 $DPKG "$DPKG_OPTS" --update-avail $CACHEDIR/available
32 rm -f $CACHEDIR/available
34 if [ x
$PROMPT = "xtrue" ]; then
35 echo "Press enter to continue." && read RES
;