~ubuntu-branches/ubuntu/wily/debootstrap/wily

« back to all changes in this revision

Viewing changes to scripts/debian/sid

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2009-07-23 16:45:00 UTC
  • Revision ID: james.westby@ubuntu.com-20090723164500-jep034mv3cq78qwy
On Linux, clear out /etc/mtab on exit if it's not a symlink. Should fix
problems Wouter Verhelst and Martin Michlmayr are seeing with
initramfs-tools MODULES=dep, although it probably isn't a perfect
solution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
mirror_style release
2
2
download_style apt
3
3
finddebs_style from-indices
4
 
variants - buildd fakechroot minbase
 
4
variants - buildd fakechroot minbase scratchbox
5
5
 
6
6
if doing_variant fakechroot; then
7
7
    test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started"
8
8
fi
9
9
 
10
 
LIBC=libc6
11
 
if [ "$ARCH" = "alpha" ] || [ "$ARCH" = "ia64" ]; then
12
 
  LIBC="libc6.1"
13
 
elif [ "$ARCH" = "hurd-i386" ]; then
14
 
  LIBC="libc0.3"
15
 
fi
 
10
case $ARCH in
 
11
  alpha|ia64) LIBC="libc6.1" ;;
 
12
  kfreebsd-*) LIBC="libc0.1" ;;
 
13
  hurd-*)     LIBC="libc0.3" ;;
 
14
  *)          LIBC="libc6" ;;
 
15
esac
16
16
 
17
17
work_out_debs () {
18
18
    required="$(get_debs Priority: required)"
21
21
      #required="$required $(get_debs Priority: important)"
22
22
      #  ^^ should be getting debconf here somehow maybe
23
23
      base="$(get_debs Priority: important)"
24
 
    elif doing_variant buildd; then
 
24
    elif doing_variant buildd || doing_variant scratchbox; then
25
25
      base="$(get_debs Build-Essential: yes)"
26
26
    elif doing_variant minbase; then
27
27
      base="apt"
89
89
 
90
90
    if doing_variant fakechroot; then 
91
91
        setup_proc_fakechroot
 
92
    elif doing_variant scratchbox; then
 
93
        true
92
94
    else
93
95
        setup_proc
94
96
        in_target /sbin/ldconfig
141
143
    exec 7>&1
142
144
 
143
145
    smallyes '' | 
144
 
     (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages.  This will be attempted up to five times." "" \
 
146
     (repeatn 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages.  This will be attempted up to five times." "" \
145
147
        dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 || echo EXITCODE $?) |
146
148
     dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING
147
149
 
167
169
    info UNPACKBASE "Unpacking the base system..."
168
170
 
169
171
    smallyes '' | 
170
 
     (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages.  This will be re-attempted up to five times." "" \
 
172
     (repeatn 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages.  This will be re-attempted up to five times." "" \
171
173
       dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 || echo EXITCODE $?) |
172
174
     dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING
173
175
 
174
176
    info CONFBASE "Configuring the base system..."
175
177
 
176
178
    smallyes '' |
177
 
     (repeat 5 \
 
179
     (repeatn 5 \
178
180
      in_target_failmsg CONF_BASE_FAIL "Failure while configuring base packages." "" \
179
181
      dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 || echo EXITCODE $?) |
180
182
     dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING