2
download_style apt var-state
5
if [ "$ARCH" = alpha ]; then
10
required="base-files base-passwd bash bsdutils debconf-tiny debianutils diff dpkg e2fsprogs fileutils findutils grep gzip hostname ldso libc6 libdb2 libgdbmg1 libncurses5 libnewt0 libpam-modules libpam-runtime libpam0g libpopt0 libreadline4 libstdc++2.10 login makedev mawk modutils mount ncurses-base ncurses-bin passwd perl-5.005-base perl-base procps sed shellutils slang1 sysklogd sysvinit tar textutils update util-linux whiptail"
12
base="adduser ae apt base-config elvis-tiny fbset fdutils gettext-base console-data console-tools console-tools-libs libdb2 libwrap0 locales modconf netbase ftp ppp pppconfig pump tasksel tcpd textutils telnet xviddetect"
15
echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' '
20
required="$(without_package "libc6" "$required") libc6.1"
23
base="$base fdflush isapnptools lilo mbr pciutils pcmcia-cs psmisc setserial syslinux"
26
# other arches may have special needs not yet represented here
27
# oh well, Potato is old
31
first_stage_install () {
34
:> "$TARGET/var/lib/dpkg/status"
35
echo > "$TARGET/var/lib/dpkg/available"
38
echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
39
chown 0:0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
45
local deb="$(debfor $pkg)"
47
ar -p "$TARGET/$deb" control.tar.gz | zcat |
48
tar -O -xf - control ./control 2>/dev/null |
49
grep -i ^Version: | sed -e 's/[^:]*: *//' | head -n 1
52
mkdir -p "$TARGET/var/lib/dpkg/info"
57
Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
59
touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
64
if [ -e "$TARGET/usr/bin/perl-5.005.dist" ]; then
65
mv "$TARGET/usr/bin/perl-5.005.dist" "$TARGET/usr/bin/perl-5.005"
67
if [ ! -e "$TARGET/usr/bin/perl" ]; then
68
ln -sf perl-5.005 "$TARGET/usr/bin/perl"
72
second_stage_install () {
74
in_target dpkg --force-depends --install $(debfor "$@")
77
export DEBIAN_FRONTEND=Noninteractive
80
ln "$TARGET/sbin/ldconfig.new" "$TARGET/sbin/ldconfig"
81
in_target /sbin/ldconfig
83
x_core_install base-files base-passwd ldso
86
ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
89
smallyes '' | x_core_install perl-5.005-base
91
x_core_install debconf-tiny
93
in_target dpkg-preconfigure $(debfor $required $base)
95
repeatn 5 in_target dpkg --force-depends --unpack $(debfor $required)
97
mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
98
cp "$TARGET/bin/true" "$TARGET/sbin/start-stop-daemon"
100
setup_dselect_method apt
102
in_target dpkg --configure --pending --force-configure-any --force-depends
104
smallyes '' | repeatn 5 in_target dpkg --force-auto-select --force-overwrite --skip-same-version --install $(debfor $base)
106
mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"