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

Unified Diff: cros_workon

Issue 3076046: cros_workon: refactor local manifest creation, kill duplicate entries (repo doesn't like them) (Closed) Base URL: ssh://gitrw.chromium.org/crosutils
Patch Set: Created 10 years, 4 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cros_workon
diff --git a/cros_workon b/cros_workon
index 5cccfe4ecd53d430d6534dba6b758f873b58ebd4..e2c04bc45b5b9979579ad6f9ee54ac8bae07d19b 100755
--- a/cros_workon
+++ b/cros_workon
@@ -132,27 +132,30 @@ regen_manifest_and_sync() {
echo Using $REPODIR
echo "Trying to generate local manifests for.."
rm -f $REPODIR/local_manifest.xml
- echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" >> $REPODIR/local_manifest.xml
- echo "<manifest>" >> $REPODIR/local_manifest.xml
- cat ${KEYWORDS_FILE} |
+ MANIFEST_ENTRIES=$(cat ${KEYWORDS_FILE} |
{
while read line
do
pkgname=`basename ${line}`
- echo "Now working on ... ${pkgname}"
+ echo "Now working on ... ${pkgname}" 1>&2
eval $(${EBUILDCMD} $(${EQUERYCMD} which ${pkgname}) info)
- echo "Looking for ${CROS_WORKON_PROJECT}.git"
+ echo "Looking for ${CROS_WORKON_PROJECT}.git" 1>&2
REPO_ELEMENT=$(sed -n '/START_MINILAYOUT/,/STOP_MINILAYOUT/p' $REPODIR/manifest.xml | grep "name=\"${CROS_WORKON_PROJECT}\"" | sed -e 's/^[ \t]*//')
- echo $REPO_ELEMENT
+ echo "$REPO_ELEMENT"
if [ -z "${REPO_ELEMENT}" ] ; then
- echo "Unable to find ${pkgname} in manifest. Aborting."
+ echo "Unable to find ${pkgname} in manifest. Aborting." 1>&2
exit 1
fi
- echo ${REPO_ELEMENT} >> $REPODIR/local_manifest.xml
done
- }
- echo "</manifest>" >> $REPODIR/local_manifest.xml
+ })
+
+ if [ -n "${MANIFEST_ENTRIES}" ]; then
+ echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" >> $REPODIR/local_manifest.xml
+ echo "<manifest>" >> $REPODIR/local_manifest.xml
+ echo "${MANIFEST_ENTRIES}"|sort|uniq >> ${REPODIR}/local_manifest.xml
+ echo "</manifest>" >> $REPODIR/local_manifest.xml
+ fi
}
# Move a stable ebuild to the live development catgeory. The ebuild
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698