From bc9981cc9029674cfd6cbd8961d54abbe6f1889f Mon Sep 17 00:00:00 2001 From: Zdenek Behan Date: Wed, 22 Sep 2010 12:59:43 -0700 Subject: [PATCH] cros_mark_all_as_stable: revert commit 868b77711655d25739de9cced84c64e72580b352 TBR=sosa,kwaters Change-Id: Ieef77cd7f08116b76d84df028be04139c2b10e48 BUG= TEST= Review URL: http://codereview.chromium.org/3473012 --- cros_mark_all_as_stable | 68 ----------------------------------------- 1 file changed, 68 deletions(-) diff --git a/cros_mark_all_as_stable b/cros_mark_all_as_stable index 75ad4ff193..e85bb0f942 100755 --- a/cros_mark_all_as_stable +++ b/cros_mark_all_as_stable @@ -53,70 +53,6 @@ function package_is_blacklisted() { expr "${1}" : "^\(${blist_regex/\\|/}\)$" &> /dev/null && return 0 || return 1 } -function ifs_normalize() { - for i in $*; do echo "${i}"; done | sort -u |tr '\n' ' ' -} - -function eclass_affected_ebuilds() { - CHROMIUMOS_OVERLAY="${HOME}/trunk/src/third_party/chromiumos-overlay/" - - info "Tracking eclass changes" - pushd "${CHROMIUMOS_OVERLAY}" 1> /dev/null - - # Look at the last time chrome-bot commited anything. - last_bot_commit=$( - git log --author=chrome-bot -1|head -n 1|cut -f2 -d' ' - ) - info "Last bot commit is: ${last_bot_commit}" - - # List of eclasses touched in all commits since that commit. - eclass_touched=$(ifs_normalize $( - git diff --name-only ${last_bot_commit}|grep "^eclass\/.*\.eclass" | \ - sed -e 's,eclass/\(.*\)\.eclass,\1,' | \ - sort -u - ) - ) - eclass_touched_prev="" - - if [ -z "${eclass_touched}" ]; then - info "No eclasses changed" - return 0 - fi - - # Iteratively add all eclasses that inherit the current list, until - # the first iteration that will not add anything. - while [ "${eclass_touched}" != "${eclass_touched_prev}" ]; do - eclass_touched_prev=${eclass_touched} - - # regexp to search for eclass inheritance - searchregexp="$(for i in ${eclass_touched}; do echo -n "\|${i}"; done)" - searchregexp="inherit.*\(${searchregexp/|/}\).*" - - # Iterate the current list of eclasses and add immediate dependencies. - eclass_touched=$(ifs_normalize $( - find "eclass/" -name '*.eclass' | \ - xargs grep -l "${searchregexp}" | \ - sed -e "s,eclass/\(.*\)\.eclass,\1," - ) ${eclass_touched} - ) - done - - info "Eclasses changed: ${eclass_touched}" - - # Look which ebuilds are affected. - # NOTE: searchregexp is usable because last two lists of eclasses were the same - ebuilds_affected=$( - find . -name '*9999.ebuild' | \ - xargs grep -l "cros-workon" | \ - xargs grep -l "${searchregexp}" | \ - sed -e "s,.\/\(.*\)/.*-9999.ebuild,\1," - ) - - echo "${ebuilds_affected}" - - popd 1> /dev/null -} - # For each package, compares the head commit id to the commit id in the ebuild. # If they do not match, add the package and its commit id into ${PACKAGE_LIST} # and ${COMMIT_ID_LIST} @@ -156,10 +92,6 @@ for package in ${PACKAGES}; do fi done -PACKAGE_LIST=$( - ifs_normalize ${PACKAGE_LIST} $(eclass_affected_ebuilds) -) - if [ -n "${PACKAGE_LIST}" ] ; then info "Candidate package list ${PACKAGE_LIST}" info "With commit id list ${COMMIT_ID_LIST}"