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

Unified Diff: build/linux/sysroot_scripts/sysroot-creator.sh

Issue 2567123002: Sysroot: Add build_and_upload.py (Closed)
Patch Set: Return non-zero exit code if any sysroot builds failed Created 4 years 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
Index: build/linux/sysroot_scripts/sysroot-creator.sh
diff --git a/build/linux/sysroot_scripts/sysroot-creator.sh b/build/linux/sysroot_scripts/sysroot-creator.sh
index 2be45bb43b688601ecaaf4aa81974a02fffd6895..3dc89191fbb3384e3d4a1d632b587f959e42ecf6 100644
--- a/build/linux/sysroot_scripts/sysroot-creator.sh
+++ b/build/linux/sysroot_scripts/sysroot-creator.sh
@@ -7,6 +7,7 @@
# to define certain environment variables: e.g.
# DISTRO=ubuntu
# DIST=trusty
+# DIST_UPDATES=trusty-updates
# APT_REPO=http://archive.ubuntu.com/ubuntu
# KEYRING_FILE=/usr/share/keyrings/ubuntu-archive-keyring.gpg
# DEBIAN_PACKAGES="gcc libz libssl"
@@ -103,8 +104,10 @@ DownloadOrCopy() {
echo "$1" | grep -qs ^http:// && HTTP=1
if [ "$HTTP" = "1" ]; then
SubBanner "downloading from $1 -> $2"
- wget "$1" -O "${2}.partial"
- mv "${2}.partial" $2
+ # Appending the "$$" shell pid is necessary here to prevent concurrent
+ # instances of sysroot-creator.sh from trying to write to the same file.
+ wget "$1" -O "${2}.partial.$$"
+ mv "${2}.partial.$$" $2
else
SubBanner "copying from $1"
cp "$1" "$2"
@@ -554,7 +557,7 @@ BuildSysrootMips() {
return
fi
ClearInstallDir
- local package_file="$BUILD_DIR/package_with_sha256sum_arm"
+ local package_file="$BUILD_DIR/package_with_sha256sum_mips"
GeneratePackageListMips "$package_file"
local files_and_sha256sums="$(cat ${package_file})"
StripChecksumsFromPackageList "$package_file"
@@ -813,6 +816,44 @@ UpdatePackageListsAll() {
RunCommand UpdatePackageListsMips
}
+#@
+#@ PrintArchitectures
+#@
+#@ Prints supported architectures.
+PrintArchitectures() {
+ if [ "$HAS_ARCH_AMD64" = "1" ]; then
+ echo Amd64
+ fi
+ if [ "$HAS_ARCH_I386" = "1" ]; then
+ echo I386
+ fi
+ if [ "$HAS_ARCH_ARM" = "1" ]; then
+ echo ARM
+ fi
+ if [ "$HAS_ARCH_ARM64" = "1" ]; then
+ echo ARM64
+ fi
+ if [ "$HAS_ARCH_MIPS" = "1" ]; then
+ echo Mips
+ fi
+}
+
+#@
+#@ PrintDistro
+#@
+#@ Prints distro. eg: ubuntu
+PrintDistro() {
+ echo ${DISTRO}
+}
+
+#@
+#@ DumpRelease
+#@
+#@ Prints disto release. eg: trusty
+PrintRelease() {
+ echo ${DIST}
+}
+
RunCommand() {
SetEnvironmentVariables "$1"
SanityCheck
@@ -831,7 +872,7 @@ elif [ "$(type -t $1)" != "function" ]; then
exit 1
else
ChangeDirectory
- if echo $1 | grep -qs "All$"; then
+ if echo $1 | grep -qs --regexp='\(^Print\)\|\(All$\)'; then
"$@"
else
RunCommand "$@"
« no previous file with comments | « build/linux/sysroot_scripts/packagelist.trusty.arm ('k') | build/linux/sysroot_scripts/sysroot-creator-jessie.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698