Add mechanism to support 'official' repositories and packages for releases.

This commit is contained in:
David McMahon 2010-01-26 18:12:55 -08:00
parent 2857eea2bc
commit 224c7fda0c
3 changed files with 20 additions and 1 deletions

View File

@ -127,6 +127,10 @@ PKGLIST="$FLAGS_pkglist"
if [ $FLAGS_with_dev_pkgs -eq $FLAGS_TRUE ]; then
PKGLIST="$PKGLIST,${SRC_ROOT}/package_repo/package-list-debug.txt"
fi
# Add official packages for ChromeOS if the file exists
if [ -f ${SRC_ROOT}/package_repo/package-list-official.txt ]; then
PKGLIST="$PKGLIST,${SRC_ROOT}/package_repo/package-list-official.txt"
fi
"${SCRIPTS_DIR}/install_packages.sh" \
--build_root="${FLAGS_build_root}" \
--root="$ROOT_FS_DIR" \

View File

@ -101,6 +101,10 @@ if [ -n "$FLAGS_mirror2" ] && [ -n "$FLAGS_suite2" ]; then
deb $FLAGS_mirror2 $FLAGS_suite2 main restricted multiverse universe
EOF
fi
# Look for official file and use it if it exists
if [ -f ${SRC_ROOT}/package_repo/sources-official.list ]; then
cat ${SRC_ROOT}/package_repo/sources-official.list >> "$APT_SOURCE"
fi
# Cache directory for APT to use. This cache is re-used across builds. We
# rely on the cache to reduce traffic to the hosted repositories.

View File

@ -47,7 +47,10 @@ eval set -- "${FLAGS_ARGV}"
# TODO: replace shflags with something less error-prone, or contribute a fix.
set -e
COMPONENTS=`cat $FLAGS_pkglist | sed -e 's/#.*//' | grep -v '^ *$' | tr '\n' ' '`
# Add additional components if file exists
OFFICIAL_COMPONENTS=$SRC_ROOT/package_repo/package-list-official.txt
[ -f $OFFICIAL_COMPONENTS ] || OFFICIAL_COMPONENTS=
COMPONENTS=$(cat $FLAGS_pkglist $OFFICIAL_COMPONENTS | sed -e 's/#.*//' | grep -v '^ *$' | tr '\n' ' ')
FULLNAME="Chrome OS dev user"
DEFGROUPS="eng,admin,adm,dialout,cdrom,floppy,audio,dip,video"
PASSWORD=chronos
@ -136,6 +139,14 @@ bash_chroot "echo $USER ALL=NOPASSWD: ALL >> /etc/sudoers"
# prefer our tools or custom packages
bash_chroot "echo deb $DEFAULT_CHROMEOS_SERVER/tools chromiumos_dev \
main > /etc/apt/sources.list"
# Add official apt source if file exists
OFFICIAL_SOURCE_LIST=$SRC_ROOT/package_repo/sources-official.list
if [ -f $OFFICIAL_SOURCE_LIST ]
then
# Copy the file into the chroot so it's cat'able
cp -fp $OFFICIAL_SOURCE_LIST $FLAGS_chroot/tmp
bash_chroot "cat /tmp/$(basename $OFFICIAL_SOURCE_LIST) >> /etc/apt/sources.list"
fi
# use specified mirror and suite for the rest of the development chroot
bash_chroot "echo deb $FLAGS_mirror $FLAGS_suite \
main restricted multiverse universe >> /etc/apt/sources.list"