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