Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Unified Diff: src/scripts/make_chroot.sh

Issue 548083: Rewrite make_chroot.sh to use local mirrors directly. (Closed)
Patch Set: add back stub make_local_repo.sh Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/scripts/install_packages.sh ('k') | src/scripts/make_local_repo.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/make_chroot.sh
diff --git a/src/scripts/make_chroot.sh b/src/scripts/make_chroot.sh
index c9bc526c8686ee7eb486aca3b77b4c7a16f624fc..5bef9a1d5845a69442090c85a9e79461e4b46ceb 100755
--- a/src/scripts/make_chroot.sh
+++ b/src/scripts/make_chroot.sh
@@ -25,10 +25,10 @@ DEFAULT_PKGLIST="$SRC_ROOT/package_repo/package-list-dev.txt"
# Define command line flags
# See http://code.google.com/p/shflags/wiki/Documentation10x
-DEFINE_string suite "$DEFAULT_DEV_SUITE" "Repository suite to base image on."
-DEFINE_string mirror "$DEFAULT_DEV_MIRROR" "Local repository mirror to use."
-DEFINE_string mirror2 "" "Additional repository mirror to use (URL only)."
-DEFINE_string suite2 "" "Repository suite for additional mirror."
+DEFINE_string suite "$DEFAULT_DEV_SUITE" \
+ "Ubuntu suite to use to create the development chroot."
+DEFINE_string mirror "$DEFAULT_DEV_MIRROR" \
+ "Ubuntu mirror to use to create the development chroot."
DEFINE_string chroot "$DEFAULT_CHROOT_DIR" \
"Destination dir for the chroot environment."
DEFINE_string pkglist "$DEFAULT_PKGLIST" \
@@ -112,7 +112,7 @@ fi
mkdir -p "$FLAGS_chroot"
# Run debootstrap to create the base chroot environment
-echo "Running debootstrap..."
+echo "Running debootstrap $FLAGS_mirror $FLAGS_suite ..."
echo "You may need to enter password for sudo now..."
sudo debootstrap --arch=i386 --exclude=rsyslog,ubuntu-minimal \
"$FLAGS_suite" "$FLAGS_chroot" "$FLAGS_mirror"
@@ -130,22 +130,19 @@ trap cleanup EXIT
bash_chroot "echo %admin ALL=\(ALL\) ALL >> /etc/sudoers"
bash_chroot "echo $USER ALL=NOPASSWD: ALL >> /etc/sudoers"
-# Set up apt sources
-# If a local repository is used, it will have a different path when
-# bind-mounted inside the chroot
-MIRROR_INSIDE="${FLAGS_mirror/$GCLIENT_ROOT/$CHROOT_TRUNK_DIR}"
-bash_chroot "echo deb $MIRROR_INSIDE $FLAGS_suite \
- main restricted multiverse universe > /etc/apt/sources.list"
-# Additional repo? Note: Not mounted inside - must use URL
-if [ -n "$FLAGS_mirror2" ]; then
- bash_chroot "echo deb $FLAGS_mirror2 $FLAGS_suite2 \
- main restricted multiverse universe >> /etc/apt/sources.list"
-fi
+# Set up apt sources.
+# prefer our tools or custom packages
+bash_chroot "echo deb $DEFAULT_CHROMEOS_SERVER/tools chromiumos_dev \
+ main > /etc/apt/sources.list"
+# 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"
+# NOTE: Add additional repos here, possibly via command-line args.
-# TODO: enable sources when needed. Currently, kernel source is checked in
+# Enable sources for upstream packages. Currently, kernel source is checked in
# and all other sources are pulled via DEPS files.
-#bash_chroot "echo deb-src $MIRROR_INSIDE $FLAGS_suite \
-# main restricted multiverse universe >> /etc/apt/sources.list"
+bash_chroot "echo deb-src $FLAGS_mirror $FLAGS_suite \
+ main restricted multiverse universe >> /etc/apt/sources.list"
# Set /etc/debian_chroot so '(chroot)' shows up in shell prompts
CHROOT_BASE=`basename $FLAGS_chroot`
« no previous file with comments | « src/scripts/install_packages.sh ('k') | src/scripts/make_local_repo.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698