]>
git.saurik.com Git - apt.git/blob - dselect/install
   3 # Get the configuration from /etc/apt/apt.conf 
   6 APTGET
="/usr/bin/apt-get" 
   8 DPKG_OPTS
="--admindir=$1" 
   9 APT_OPT0
="-oDir::State::status=$1/status" 
  10 APT_OPT1
="-oDPkg::Options::=$DPKG_OPTS" 
  12 RES
=`apt-config shell CLEAN DSelect::Clean OPTS DSelect::Options \ 
  13                       DPKG Dir::Bin::dpkg/f APTGET Dir::Bin::apt-get/f \ 
  14                       ARCHIVES Dir::Cache::Archives/d \ 
  15                       WAIT DSelect::WaitAfterDownload/b \ 
  16                       CHECKDIR DSelect::CheckDir/b` 
  27                         Y
|y
)    defp
="[Y/n]" def
=y
;; 
  28                         N
|n
)    defp
="[y/N]" def
=n
;; 
  29                         *)      echo "Bad default setting!" 1>&2; exit 1;; 
  35                 echo -n "$1 $defp " 1>&3 
  46 if [ x
$WAIT = "xtrue" ]; then 
  47    $APTGET $OPTS "$APT_OPT0" "$APT_OPT1" -d dselect
-upgrade 
  48    echo "Press enter to continue." && read RES
 
  49    $APTGET $OPTS "$APT_OPT0" "$APT_OPT1" dselect
-upgrade 
  52    $APTGET $OPTS "$APT_OPT0" "$APT_OPT1" dselect
-upgrade 
  56 # 1 means the user choose no at the prompt 
  57 if [ $RES -eq 1 ]; then 
  62 if [ $RES -eq 0 ]; then 
  64    if [ `ls $ARCHIVES $ARCHIVES/partial | egrep -v "^lock$|^partial$" | wc -l` \
 
  69    NEWLS
=`ls -ld $ARCHIVES` 
  70    if [ x
$CHECKDIR = "xtrue" ]; then 
  71       if [ "x$OLDLS" = "x$NEWLS" ]; then 
  76    # Check the cleaning mode 
  77    case `echo $CLEAN | tr '[:upper:]' '[:lower:]'` in 
  79        $APTGET "$APT_OPT0" "$APT_OPT1" autoclean 
&& 
  80            echo "Press enter to continue." && read RES 
&& exit 0; 
  83        $APTGET "$APT_OPT0" "$APT_OPT1" clean 
&& 
  84            echo "Press enter to continue." && read RES 
&& exit 0; 
  88        if [ `yesno "Do you want to erase any previously downloaded .deb files?" y` = y 
]; then 
  89           $APTGET "$APT_OPT0" "$APT_OPT1" clean 
&& 
  90             echo "Press enter to continue." && read RES 
&& exit 0; 
  97    echo "Some errors occurred while unpacking. I'm going to configure the" 
  98    echo "packages that were installed. This may result in duplicate errors" 
  99    echo "or errors caused by missing dependencies. This is OK, only the errors" 
 100    echo "above this message are important. Please fix them and run [I]nstall again" 
 101    echo "Press enter to continue." 
 102    read RES 
&& $DPKG "$DPKG_OPTS" --configure -a