Add 9999 revving logic to cros_mark_all_as_stable.

TEST=Ran it and saw appropriate changes.

Change-Id: I5f51e16918993b9dbf53b38cb3a365fafe77c8eb

Review URL: http://codereview.chromium.org/3231007
This commit is contained in:
Chris Sosa 2010-08-30 15:04:59 -07:00
parent 1e0dcbd15c
commit b1e772a180

View File

@ -62,6 +62,9 @@ for package in ${PACKAGES}; do
continue continue
fi fi
ebuild_path=$(${EQUERYCMD} which ${package}) || continue ebuild_path=$(${EQUERYCMD} which ${package}) || continue
# Get 9999 ebuild path to see if it got changed.
ebuild_9999_path=$(ACCEPT_KEYWORDS=~* ${EQUERYCMD} which ${package}) \
|| continue
# Sets ${CROS_WORKON_SRCDIR} from the ebuild. # Sets ${CROS_WORKON_SRCDIR} from the ebuild.
eval $(${EBUILDCMD} ${ebuild_path} info) &> /dev/null || continue eval $(${EBUILDCMD} ${ebuild_path} info) &> /dev/null || continue
head_commit=$( cd "${CROS_WORKON_SRCDIR}" &&\ head_commit=$( cd "${CROS_WORKON_SRCDIR}" &&\
@ -76,7 +79,14 @@ for package in ${PACKAGES}; do
PACKAGE_LIST="${PACKAGE_LIST} ${package}" PACKAGE_LIST="${PACKAGE_LIST} ${package}"
COMMIT_ID_LIST="${COMMIT_ID_LIST} ${head_commit}" COMMIT_ID_LIST="${COMMIT_ID_LIST} ${head_commit}"
elif [[ ${head_commit} = ${egit_commit} ]]; then elif [[ ${head_commit} = ${egit_commit} ]]; then
info "Commit id's match for ${package}" info "Commit id's match for ${package}, checking for 9999 ebuild change."
# egrep succeeds if there are important differences between the ebuilds.
if diff "${ebuild_path}" "${ebuild_9999_path}" | \
egrep -v "KEYWORDS|CROS_WORKON_COMMIT|^---|^[<>]\ *$|^[0-9]"; then
info "Detected 9999 ebuild change for ${package}."
PACKAGE_LIST="${PACKAGE_LIST} ${package}"
COMMIT_ID_LIST="${COMMIT_ID_LIST} ${egit_commit}"
fi
fi fi
done done