~xubuntu-dev/ubiquity/lp1437180_feh

« back to all changes in this revision

Viewing changes to compat/apt-install

  • Committer: Michael Terry
  • Date: 2009-07-14 13:14:35 UTC
  • mfrom: (3285.2.37 ubiquity.reorg)
  • Revision ID: michael.terry@canonical.com-20090714131435-m8wkg4pnp4cfwr38
merge from lp:~mterry/ubiquity/oem-config-merge : oem-config and ubiquity now share the same code base\!

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh -e
 
2
 
 
3
setup_env()
 
4
{
 
5
        unset DEBIAN_HAS_FRONTEND
 
6
        export DEBIAN_FRONTEND=noninteractive
 
7
        unset DEBCONF_FRONTEND
 
8
        unset DEBCONF_REDIR
 
9
        export DEBCONF_ADMIN_EMAIL=
 
10
        export APT_LISTCHANGES_FRONTEND=none
 
11
}
 
12
 
 
13
apt_get_args="--no-upgrade -o Acquire::gpgv::Options::=--ignore-time-conflict -y"
 
14
 
 
15
if [ -n "$UBIQUITY_OEM_USER_CONFIG" ]; then
 
16
        # The installer uses apt-install to queue packages for installation in the
 
17
        # target system. In oem user config mode, we can just install them directly.
 
18
        setup_env
 
19
        apt-get $apt_get_args install "$@" </dev/null
 
20
        exit 0
 
21
fi
 
22
 
2
23
mkdir -p /var/lib/ubiquity
3
24
for package; do
4
25
        echo "$package" >> /var/lib/ubiquity/apt-installed
12
33
        toinstall="$(echo "$@" | xargs -n1 | sort | join -v1 - "$installed")"
13
34
        if [ "$toinstall" ]; then
14
35
                # TODO: use chroot-setup
15
 
                unset DEBIAN_HAS_FRONTEND
16
 
                export DEBIAN_FRONTEND=noninteractive
17
 
                unset DEBCONF_FRONTEND
18
 
                unset DEBCONF_REDIR
19
 
                export DEBCONF_ADMIN_EMAIL=
20
 
                export APT_LISTCHANGES_FRONTEND=none
21
 
                chroot /target apt-get --no-upgrade \
22
 
                        -o Acquire::gpgv::Options::=--ignore-time-conflict -y \
23
 
                        install $toinstall </dev/null
 
36
                setup_env
 
37
                chroot /target apt-get $apt_get_args install $toinstall </dev/null
24
38
        fi
25
39
fi