Add function to update fingerprints. May come in handy some day.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41175 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jonas Sundström
2011-04-04 02:21:31 +00:00
parent 04b7a7e27b
commit 04a59db1ff
+39
View File
@@ -50,6 +50,13 @@ Options - in order of intended workflow:
--delete Delete tarballs and tempfolder. --delete Delete tarballs and tempfolder.
--fix_fingerprints Force expected fingerprints on catkeys that fail to build.
Don't use this unless the fingerprints broke due to your
editing of catalog entries, and you need the fingerprints
to be updated. (It's a brute-force approach, including two
full "jam clean". Caveat emptor.)
'********************************************' '********************************************'
'* This script is probably not safe. *' '* This script is probably not safe. *'
@@ -287,6 +294,33 @@ RemoveTempDirectoryIfEmpty()
} }
FixFingerprintsOfFailingCatalogs()
{
# Find the catalogs that won't build.
bad_catalogs=$( \
echo $( \
jam catalogs 2>&1 \
| awk '-Fsource-catalog ' '{print$2}' \
| awk '-F - error' '{print$1}' \
| sort -u));
# Find the present and the expected fingerprints.
# Produce a script to replace present fingerprints with the expected ones.
jam catalogs 2>&1 \
| grep 'instead of' \
| awk '-Fafter load ' '{print$2}' \
| awk '-F. The catalog data' '{print$1}' \
| sed 's/ instead of /\t/g' | sed 's/[()]//g' \
| awk '{print "sed -i s/" $2 "/" $1 "/g"}' \
| awk "{ print \$0\" $bad_catalogs\" }" \
> hta_fingerprint_correction_script.sh;
chmod u+x hta_fingerprint_correction_script.sh;
$(hta_fingerprint_correction_script.sh);
rm hta_fingerprint_correction_script.sh
}
if [ $# -eq 1 ] ; then if [ $# -eq 1 ] ; then
case "$1" in case "$1" in
--help) --help)
@@ -359,6 +393,11 @@ if [ $# -eq 1 ] ; then
CommitAllLanguages CommitAllLanguages
exit exit
;; ;;
--fix_fingerprints)
AssertCurrentDirIsSubversionTrunk
FixFingerprintsOfFailingCatalogs
exit
;;
*) *)
usage usage
exit 1 exit 1