From b059e344fc9f97b51d26e223905e998baa60d18e Mon Sep 17 00:00:00 2001 From: David McMahon Date: Tue, 8 Dec 2009 18:10:45 -0800 Subject: [PATCH] Misc. fixes to versioning. --- archive_build.sh | 6 +++++- build_image.sh | 1 + chromeos_version.sh | 5 ----- customize_rootfs.sh | 4 +++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/archive_build.sh b/archive_build.sh index fb5180c611..5881e0a755 100755 --- a/archive_build.sh +++ b/archive_build.sh @@ -50,7 +50,11 @@ REVISION=${REVISION:0:8} # Use the version number plus revision as the last change. (Need both, since # trunk builds multiple times with the same version string.) -LAST_CHANGE="${CHROMEOS_VERSION_STRING}-r${REVISION}-b${FLAGS_build_number}" +LAST_CHANGE="${CHROMEOS_VERSION_STRING}-r${REVISION}" +if [ -n "$FLAGS_build_number" ] +then + LAST_CHANGE="$LAST_CHANGE-b${FLAGS_build_number}" +fi # The Chromium buildbot scripts only create a clickable link to the archive # if an output line of the form "last change: XXX" exists diff --git a/build_image.sh b/build_image.sh index 3bb5221c7e..02d876a2bc 100755 --- a/build_image.sh +++ b/build_image.sh @@ -208,6 +208,7 @@ MIRROR2_INSIDE="${FLAGS_mirror2/$GCLIENT_ROOT//trunk}" # Write options for customize script into the chroot CUST_OPTS="${SETUP_DIR}/customize_opts.sh" cat < $CUST_OPTS +REAL_USER=$USER SETUP_DIR="$ROOTFS_SETUP_DIR" KERNEL_VERSION="$KERNEL_VERSION" SERVER="$MIRROR_INSIDE" diff --git a/chromeos_version.sh b/chromeos_version.sh index a2c64915fb..8d7cad277d 100755 --- a/chromeos_version.sh +++ b/chromeos_version.sh @@ -21,11 +21,6 @@ HOSTNAME=$(hostname) export CHROMEOS_VERSION_MAJOR=0 export CHROMEOS_VERSION_MINOR=5 -# Major/minor versions. -# Primarily for product marketing. -export CHROMEOS_VERSION_MAJOR=0 -export CHROMEOS_VERSION_MINOR=5 - # Branch number. # Increment by 1 in a new release branch. # Increment by 2 in trunk after making a release branch. diff --git a/customize_rootfs.sh b/customize_rootfs.sh index 15dcaba0c7..ae23784b6b 100755 --- a/customize_rootfs.sh +++ b/customize_rootfs.sh @@ -42,9 +42,11 @@ fi # Set CHROMEOS_VERSION_DESCRIPTION here (uses vars set in chromeos_version.sh) # Was removed from chromeos_version.sh which can also be run outside of chroot # where CHROMEOS_REVISION is set +# We have to set (in build_image.sh) and use REAL_USER due to many nested +# chroots which lose $USER state. if [ ${CHROMEOS_OFFICIAL:-0} = 1 ]; then export CHROMEOS_VERSION_DESCRIPTION="${CHROMEOS_VERSION_STRING} (Official Build ${CHROMEOS_REVISION:?})" -elif [ "$USER" = "chrome-bot" ] +elif [ "$REAL_USER" = "chrome-bot" ] then export CHROMEOS_VERSION_DESCRIPTION="${CHROMEOS_VERSION_STRING} (Continuous Build ${CHROMEOS_REVISION:?} - Builder: ${BUILDBOT_BUILD:-"N/A"})" else