3 # Copyright © 1995-1998 Ian Jackson <ijackson@chiark.greenend.org.uk>
4 # Copyright © 1998 Heiko Schlittermann <hs@schlittermann.de>
6 # This is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <https://www.gnu.org/licenses/>.
23 iarch=`dpkg --print-architecture`
25 cd "$vardir/methods/$method"
29 #debug() { echo "DEBUG: $@"; }
31 ismulti() { debug $1 $2; test -e "$1/.disk/info" || test -e "$1$2/.disk/info"; }
34 for f in main ctb nf nonus nonusctb nonusnf lcl
36 eval 'this_packages=$p_'$f'_packages'
38 if [ -n "$this_packages" ]
47 No Packages files available, cannot update available packages list.
48 Hit RETURN to continue. '
55 rm -f packages-{main,ctb,nf,nonus,nonusctb,nonusnf,lcl}
58 umount "$umount" >/dev/null 2>&1
63 if [ ! -b "$p_blockdev" ]
68 if [ -n "$p_blockdev" ]
70 umount="$p_mountpoint"
71 mount -rt "$p_fstype" -o nosuid,nodev${loop} "$p_blockdev" "$p_mountpoint"
76 umount="$p_mountpoint"
77 mount -rt nfs "$p_nfs" -o nosuid,nodev "$p_mountpoint"
82 if [ -z "$p_multi" ]; then
86 for f in main ctb nf nonus nonusctb nonusnf lcl
88 eval 'this_packages=$p_'$f'_packages'
89 case "$this_packages" in
94 eval 'this_binary=$p_'$f'_binary'
95 if [ -z "$this_binary" ]; then continue; fi
96 if [ "$updatetype" = update ]
101 echo Running dpkg --record-avail -R "$p_mountpoint$this_binary"
102 dpkg --record-avail -R "$p_mountpoint$this_binary"
105 packagesfile="$p_mountpoint$this_packages"
106 case "$packagesfile" in
107 *.gz | *.Z | *.GZ | *.z)
108 echo -n "Uncompressing $packagesfile ... "
109 zcat <"$packagesfile" >packages-$f
111 dpkg --$updatetype-avail packages-$f
117 dpkg --$updatetype-avail "$packagesfile"
125 cp -f $vardir/available $vardir/methods/$method
127 echo -n 'Update OK. Hit RETURN. '