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

Issue 9702047: Lots of tweaks to the install-chroot.sh and install-build-deps.sh (Closed)

Created:
8 years, 9 months ago by Markus (顧孟勤)
Modified:
8 years, 9 months ago
Reviewers:
Michael Moss
CC:
chromium-reviews
Visibility:
Public.

Description

Lots of tweaks to the install-chroot.sh and install-build-deps.sh script to make them more userfriendly. In particular, we now recognize systems that have multiple filesystems (e.g. /home on NFS) and offer to do the right thing. We also have better support for new Ubuntu distributions (both as host and as guest). This means, we can now test on "precise". Added a lot of extra error handling to catch common problems and either fix them or offer suggestions on how the user can fix them. For example, we now detect if the user tries to re-install the same chroot environment multiple times; and we then offer to delete or overwrite the old installation. We also detect if a chroot environment is still in active use, and then refuse to damage it. In order to help users, who accidentally left an old chroot enviroment running, we have added a "clean up" option to the wrapper script. We automatically invoke install-build-deps.sh from install-chroot.sh, so users only need to run install-chroot.sh and then answer a couple of questions. BUG=none TEST=run install-chroot.sh on a Ubuntu machine and install both lucid32 and precise32. Verify that afterwards, we can build Chrome inside the chroot. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=126957

Patch Set 1 #

Total comments: 9

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+533 lines, -62 lines) Patch
M build/install-build-deps.sh View 5 chunks +20 lines, -9 lines 0 comments Download
M build/install-chroot.sh View 1 12 chunks +513 lines, -53 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Markus (顧孟勤)
8 years, 9 months ago (2012-03-14 22:49:58 UTC) #1
Michael Moss
LGTM++ with a couple nits. https://chromiumcodereview.appspot.com/9702047/diff/1/build/install-chroot.sh File build/install-chroot.sh (right): https://chromiumcodereview.appspot.com/9702047/diff/1/build/install-chroot.sh#newcode17 build/install-chroot.sh:17: admin=$(grep '^admin:' /etc/group >&/dev/null ...
8 years, 9 months ago (2012-03-15 17:35:37 UTC) #2
Markus (顧孟勤)
8 years, 9 months ago (2012-03-15 18:20:09 UTC) #3
I made the changes that you ask for, and will commit.

https://chromiumcodereview.appspot.com/9702047/diff/1/build/install-chroot.sh
File build/install-chroot.sh (right):

https://chromiumcodereview.appspot.com/9702047/diff/1/build/install-chroot.sh...
build/install-chroot.sh:17: admin=$(grep '^admin:' /etc/group >&/dev/null &&
echo admin || echo adm)
Fair enough. Normally, I tend to avoid -q and -s, as they are both unportable
and IMHO less readable than redirections. But I really don't feel particularly
strongly.

This code is by definition very specific to Linux; in fact, very specific to
Ubuntu/Debian. So, I don't think we really need to worry about portability as
much as we would worry in other scripts.

I found all occurrences of "grep" and switched them over to using -q and -s.

https://chromiumcodereview.appspot.com/9702047/diff/1/build/install-chroot.sh...
build/install-chroot.sh:43: echo "Invalid -l option(s)"
Thanks!

https://chromiumcodereview.appspot.com/9702047/diff/1/build/install-chroot.sh...
build/install-chroot.sh:261: head -n26)"
Done

https://chromiumcodereview.appspot.com/9702047/diff/1/build/install-chroot.sh...
build/install-chroot.sh:374: echo '/media /media none rw,bind 0 0' |
Very good call :-) Yes, that would never have worked as intended.

Powered by Google App Engine
This is Rietveld 408576698