3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <https://www.gnu.org/licenses/>.
21 cd "$vardir/methods/file"
25 if [ -z "$p_main_packages" ] && [ -z "$p_ctb_packages" ] && \
26 [ -z "$p_nf_packages" ] && [ -z "$p_lcl_packages" ]; then
28 No Packages files available, cannot update available packages list.
29 Hit RETURN to continue. '
36 rm -f packages-main packages-ctb packages-nf packages-lcl
42 for f
in main ctb nf lcl
; do
43 eval 'this_packages=$p_'$f'_packages'
44 case "$this_packages" in
49 eval 'this_binary=$p_'$f'_binary'
50 if [ -z "$this_binary" ]; then
53 if [ "$updatetype" = update
]; then
54 dpkg
--admindir $vardir --clear-avail
57 echo Running dpkg
--record-avail -R "$p_mountpoint$this_binary"
58 dpkg
--admindir $vardir --record-avail -R "$p_mountpoint$this_binary"
61 packagesfile
="$p_mountpoint$this_packages"
62 case "$packagesfile" in
64 echo -n "Uncompressing $packagesfile ... "
65 zcat
<"$packagesfile" >packages-
$f
67 dpkg
--admindir $vardir --$updatetype-avail packages-
$f
73 dpkg
--admindir $vardir --$updatetype-avail "$packagesfile"
81 echo -n 'Update OK. Hit RETURN. '