8066769: Fix merge errors following JDK-8049367

Reviewed-by: erikj
This commit is contained in:
Magnus Ihse Bursie 2015-01-15 15:09:37 +01:00
parent 9ca8fd34f2
commit a278a118ee
4 changed files with 200 additions and 139 deletions

View File

@ -76,10 +76,13 @@ diff_text() {
TMP=1
if [[ "$THIS_FILE" = *"META-INF/MANIFEST.MF" ]]; then
# Filter out date string, ant version and java version differences.
TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \
$GREP '^[<>]' | \
$SED -e '/[<>] Ant-Version: Apache Ant .*/d' \
-e '/[<>] Created-By: .* (Oracle Corporation).*/d')
-e '/[<>] Created-By: .* (Oracle [Corpatin)]*/d' \
-e '/[<>] [Corpatin]*)/d' \
-e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d')
fi
if test "x$SUFFIX" = "xjava"; then
TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \
@ -130,11 +133,10 @@ diff_text() {
$GREP '^[<>]' | \
$SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d')
fi
if test "x$SUFFIX" = "xMF"; then
# Filter out date string differences.
if test "x$SUFFIX" = "xhtml"; then
TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \
$GREP '^[<>]' | \
$SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d')
$SED -e '/[<>] <!-- Generated by javadoc .* on .* -->/d' )
fi
if test -n "$TMP"; then
echo Files $OTHER_FILE and $THIS_FILE differ
@ -237,7 +239,7 @@ compare_permissions() {
if [ "$OP" != "$TP" ]
then
if [ -z "$found" ]; then echo ; found="yes"; fi
$PRINTF "\told: ${OP} new: ${TP}\t$f\n"
$PRINTF "\tother: ${OP} this: ${TP}\t$f\n"
fi
done
if [ -z "$found" ]; then
@ -265,22 +267,20 @@ compare_file_types() {
if [ ! -f ${THIS_DIR}/$f ]; then continue; fi
OF=`cd ${OTHER_DIR} && $FILE -h $f | $SED 's/BuildID[^,]*//g'`
TF=`cd ${THIS_DIR} && $FILE -h $f | $SED 's/BuildID[^,]*//g'`
if [ "$f" = "./src.zip" ] || [[ "$f" = *"/Home/src.zip" ]] || [[ "$f" = *"/lib/JObjC.jar" ]]
then
if [ "`echo $OF | $GREP -ic zip`" -gt 0 -a "`echo $TF | $GREP -ic zip`" -gt 0 ]
then
# the way we produces zip-files make it so that directories are stored in old file
# but not in new (only files with full-path)
# this makes file-5.09 report them as different
continue;
fi
fi
if [ "$OF" != "$TF" ]
then
if [ "`echo $OF | $GREP -c 'Zip archive data'`" -gt 0 ] \
&& [ "`echo $TF | $GREP -c 'Zip archive data'`" -gt 0 ]
then
# the way we produce zip-files make it so that directories are stored in
# old file but not in new (only files with full-path) this makes file
# report them as different
continue
else
if [ -z "$found" ]; then echo ; found="yes"; fi
$PRINTF "\tother: ${OF}\n\tthis : ${TF}\n"
fi
fi
done
if [ -z "$found" ]; then
echo "Identical!"
@ -299,9 +299,10 @@ compare_general_files() {
GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" ! -name "*.jimage" \
! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" ! -name "*.cpl" \
! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" \
! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" ! -name "JavaUpdater" \
| $GREP -v "./bin/" | $SORT | $FILTER)
echo General files...
@ -377,7 +378,7 @@ compare_zip_file() {
THIS_SUFFIX="${THIS_ZIP##*.}"
OTHER_SUFFIX="${OTHER_ZIP##*.}"
if [ "$THIS_SUFFIX" != "$OTHER_SUFFIX" ]; then
echo The files do not have the same suffix type!
echo "The files do not have the same suffix type! ($THIS_SUFFIX != $OTHER_SUFFIX)"
return 2
fi
@ -573,6 +574,10 @@ compare_bin_file() {
$MKDIR -p $FILE_WORK_DIR
# Make soft links to original files from work dir to facilitate debugging
$LN -f -s $THIS_FILE $WORK_FILE_BASE.this
$LN -f -s $OTHER_FILE $WORK_FILE_BASE.other
ORIG_THIS_FILE="$THIS_FILE"
ORIG_OTHER_FILE="$OTHER_FILE"
@ -593,6 +598,7 @@ compare_bin_file() {
# On windows we need to unzip the debug symbols, if present
OTHER_FILE_BASE=${OTHER_FILE/.dll/}
OTHER_FILE_BASE=${OTHER_FILE_BASE/.exe/}
OTHER_FILE_BASE=${OTHER_FILE_BASE/.cpl/}
DIZ_NAME=$(basename $OTHER_FILE_BASE).diz
# java.exe and java.dll diz files will have the same name. Have to
# make sure java.exe gets the right one. This is only needed for
@ -822,11 +828,14 @@ compare_bin_file() {
# Compare disassemble output
if [ -n "$DIS_CMD" ] && [ -z "$SKIP_DIS_DIFF" ]; then
# By default we filter out differences that include references to symbols.
# To get a raw diff with the complete disassembly, set
# DIS_DIFF_FILTER="$CAT"
if [ -z "$DIS_DIFF_FILTER" ]; then
DIS_DIFF_FILTER="$CAT"
DIS_DIFF_FILTER="$GREP -v ' # .* <.*>$'"
fi
$DIS_CMD $OTHER_FILE | $GREP -v $NAME | $DIS_DIFF_FILTER > $WORK_FILE_BASE.dis.other 2>&1
$DIS_CMD $THIS_FILE | $GREP -v $NAME | $DIS_DIFF_FILTER > $WORK_FILE_BASE.dis.this 2>&1
$DIS_CMD $OTHER_FILE | $GREP -v $NAME | eval "$DIS_DIFF_FILTER" > $WORK_FILE_BASE.dis.other 2>&1
$DIS_CMD $THIS_FILE | $GREP -v $NAME | eval "$DIS_DIFF_FILTER" > $WORK_FILE_BASE.dis.this 2>&1
LC_ALL=C $DIFF $WORK_FILE_BASE.dis.other $WORK_FILE_BASE.dis.this > $WORK_FILE_BASE.dis.diff
@ -907,7 +916,9 @@ compare_all_libs() {
OTHER_DIR=$2
WORK_DIR=$3
LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' -o -name 'JavaControlPanel' \) | $SORT | $FILTER)
LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' \
-o -name '*.dll' -o -name '*.obj' -o -name '*.o' \
-o -name '*.cpl' \) | $SORT | $FILTER)
if [ -n "$LIBS" ]; then
echo Libraries...
@ -1189,6 +1200,17 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
echo "Also comparing macosx bundles"
fi
if [ -d "$THIS/deploy" ] && [ -d "$OTHER/deploy" ]; then
THIS_DEPLOY_BUNDLE_DIR="$THIS/deploy/dist/installer/bundles"
OTHER_DEPLOY_BUNDLE_DIR="$OTHER/deploy/bundles"
echo "Also comparing deploy/bundles"
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/deploy/JavaAppletPlugin.plugin"
OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/deploy/JavaAppletPlugin.plugin"
echo "Also comparing JavaAppletPlugin"
fi
fi
if [ -d "$OTHER/images" ]; then
OTHER_SEC_DIR="$OTHER/images"
else
@ -1254,6 +1276,12 @@ if [ "$CMP_NAMES" = "true" ]; then
compare_dirs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
compare_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
echo -n "JavaAppletPlugin "
compare_dirs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
echo -n "JavaAppletPlugin "
compare_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
if [ "$CMP_PERMS" = "true" ]; then
@ -1266,6 +1294,10 @@ if [ "$CMP_PERMS" = "true" ]; then
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_permissions $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
echo -n "JavaAppletPlugin "
compare_permissions $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
if [ "$CMP_TYPES" = "true" ]; then
@ -1284,6 +1316,10 @@ if [ "$CMP_TYPES" = "true" ]; then
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_file_types $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
echo -n "JavaAppletPlugin "
compare_file_types $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
if [ "$CMP_GENERAL" = "true" ]; then
@ -1306,6 +1342,10 @@ if [ "$CMP_GENERAL" = "true" ]; then
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_general_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
echo -n "JavaAppletPlugin "
compare_general_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
if [ "$CMP_ZIPS" = "true" ]; then
@ -1333,6 +1373,12 @@ if [ "$CMP_ZIPS" = "true" ]; then
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_all_zip_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_BUNDLE_DIR" ] && [ -n "$OTHER_DEPLOY_BUNDLE_DIR" ]; then
compare_all_zip_files $THIS_DEPLOY_BUNDLE_DIR $OTHER_DEPLOY_BUNDLE_DIR $COMPARE_ROOT/deploy-bundle
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
compare_all_zip_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
if [ "$CMP_JARS" = "true" ]; then
@ -1342,6 +1388,9 @@ if [ "$CMP_JARS" = "true" ]; then
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_all_jar_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
compare_all_jar_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
if [ "$CMP_LIBS" = "true" ]; then
@ -1356,15 +1405,27 @@ if [ "$CMP_LIBS" = "true" ]; then
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_all_libs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
echo -n "JavaAppletPlugin "
compare_all_libs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
if [ "$CMP_EXECS" = "true" ]; then
if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
compare_all_execs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
echo -n "J2RE "
compare_all_execs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi
fi
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_all_execs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
echo -n "JavaAppletPlugin "
compare_all_execs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
echo