~ubuntu-branches/ubuntu/breezy/debootstrap/breezy

« back to all changes in this revision

Viewing changes to slink

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, warty
  • Date: 2004-10-13 00:02:10 UTC
  • Revision ID: james.westby@ubuntu.com-20041013000210-6kxir6wy5l3x0qm0
Tags: 0.2.39ubuntu22
[warty] Remove pcmcia-cs from Base.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
mirror_style main
 
3
download_style apt var-state
 
4
 
 
5
work_out_debs () {
 
6
    required="base-files base-passwd bash bsdutils debianutils diff dpkg e2fsprogs fileutils findutils grep gzip hostname ldso libdb2 libgdbmg1 libncurses4 ncurses3.4 libpam0g libpam0g-util libpwdb0g libreadlineg2 libstdc++2.9 login makedev mawk modutils mount ncurses-base ncurses-bin newt0.25 passwd perl-base procps sed shellutils slang1 sysklogd sysvinit tar textutils update util-linux whiptail"
 
7
 
 
8
    base="adduser ae apt elvis-tiny fbset fdutils console-tools console-tools-libs libdb2 locales modconf netbase ppp pppconfig textutils telnet"
 
9
 
 
10
    case $ARCH in
 
11
        "i386")
 
12
            required="$required libc6"
 
13
            base="$base fdflush isapnptools lilo mbr pciutils psmisc setserial syslinux"
 
14
            ;;
 
15
    esac
 
16
 
 
17
    all_debs="$required $base"
 
18
}
 
19
 
 
20
install_debs () {
 
21
    extract $required
 
22
 
 
23
    :> "$TARGET/var/lib/dpkg/status"
 
24
    :> "$TARGET/var/lib/dpkg/available"
 
25
 
 
26
    setup_etc
 
27
    echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
 
28
    chown 0.0 $TARGET/etc/fstab; chmod 644 $TARGET/etc/fstab
 
29
 
 
30
    mkdir -p "$TARGET/dev/pts"
 
31
 
 
32
    setup_proc
 
33
    setup_devices
 
34
 
 
35
    mv "$TARGET/usr/bin/perl.dist" "$TARGET/usr/bin/perl"
 
36
 
 
37
    ln "$TARGET/sbin/ldconfig.new" "$TARGET/sbin/ldconfig"
 
38
    in_target /sbin/ldconfig
 
39
 
 
40
    x_feign_install () {
 
41
        local pkg=$1
 
42
        local deb="$(debfor $pkg)"
 
43
        local ver="$(
 
44
            ar -p $TARGET/$deb control.tar.gz | zcat |
 
45
                tar -O -xf - control ./control 2>/dev/null |
 
46
                sed -ne 's/^Version: *//Ip' | head -n 1
 
47
        )"
 
48
 
 
49
        mkdir -p "$TARGET/var/lib/dpkg/info"
 
50
    
 
51
echo \
 
52
"Package: $pkg
 
53
Version: $ver
 
54
Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
 
55
 
 
56
        touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
 
57
    }
 
58
 
 
59
    x_core_install () {
 
60
        in_target dpkg --force-depends --install $(debfor "$@")
 
61
    }
 
62
 
 
63
    x_feign_install dpkg
 
64
 
 
65
    x_core_install base-files base-passwd ldso
 
66
    x_core_install dpkg
 
67
 
 
68
    ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
 
69
    x_core_install libc6
 
70
 
 
71
    x_core_install perl-base
 
72
    x_core_install mawk
 
73
 
 
74
    repeat 5 in_target dpkg --force-depends --unpack $(debfor $required)
 
75
 
 
76
    mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
 
77
    cp "$TARGET/bin/true" "$TARGET/sbin/start-stop-daemon"
 
78
 
 
79
    setup_dselect_method apt
 
80
    #on_exit "in_target umount /dev/pts"
 
81
 
 
82
    in_target dpkg --configure --pending --force-configure-any --force-depends
 
83
 
 
84
    smallyes '' | repeat 5 in_target dpkg --force-auto-select --force-overwrite \
 
85
        --skip-same-version --install $(debfor $base)
 
86
 
 
87
    mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
 
88
}