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: $@"; }
35 for f
in main ctb nf lcl
; do
36 eval 'this_packages=$p_'$f'_packages'
38 if [ -n "$this_packages" ]; then
43 if [ $packages eq
0 ]; then
45 No Packages files available, cannot update available packages list.
46 Hit RETURN to continue. '
53 for area in main ctb nf lcl; do
56 if [ -n "$umount" ]; then
57 umount "$umount" >/dev/null 2>&1
62 if [ ! -b "$p_blockdev" ]; then
66 if [ -n "$p_blockdev" ]; then
67 umount
="$p_mountpoint"
68 mount
-rt "$p_fstype" -o nosuid
,nodev
${loop} "$p_blockdev" "$p_mountpoint"
73 if [ -z "$p_multi" ]; then
77 for f
in main ctb nf lcl
; do
78 eval 'this_packages=$p_'$f'_packages'
79 case "$this_packages" in
84 eval 'this_binary=$p_'$f'_binary'
85 if [ -z "$this_binary" ]; then
88 if [ "$updatetype" = update
]; then
92 echo Running dpkg
--record-avail -R "$p_mountpoint$this_binary"
93 dpkg
--record-avail -R "$p_mountpoint$this_binary"
96 packagesfile
="$p_mountpoint$this_packages"
97 case "$packagesfile" in
99 echo -n "Uncompressing $packagesfile ... "
100 zcat
<"$packagesfile" >packages-
$f
102 dpkg
--$updatetype-avail packages-
$f
108 dpkg
--$updatetype-avail "$packagesfile"
116 cp -f $vardir/available
$vardir/methods
/$method
118 echo -n 'Update OK. Hit RETURN. '