]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Ensure proper comparison order in "abi-check" jobs
authorMichal Nowak <mnowak@isc.org>
Wed, 15 Apr 2020 09:06:22 +0000 (11:06 +0200)
committerMichal Nowak <mnowak@isc.org>
Thu, 23 Apr 2020 06:49:29 +0000 (08:49 +0200)
Right before the release API version (LIBINTERFACE, LIBREVISION, LIBAGE)
for older and newer libraries tends to be the same. Given that, commit
hash can't be the determining factor here, Unix time of the commit
should suit us better and is placed after the API version. The commit
hash is preserved as it's useful to see it in the actual report.

'-nosymtbl' versions of libraries are not produced in Automake builds.

util/api-checker.sh

index a424234ecaf1be454304ce2403455d0da25c5e49..070d5370fcb816bfc847d7902c53b91297c1953b 100755 (executable)
@@ -49,14 +49,14 @@ check_program w3m
 # generate ABI dump file for them.
 while read -r SO; do
        APIFILE="$(dirname "${SO}")/../api"
-       pushd "$(dirname "${APIFILE}")"
-       GIT_REVISION=$(git rev-parse HEAD | cut -c 1-10)
-       popd
+       APIFILE_DIR=$(dirname "${APIFILE}")
+       GIT_HEAD_REV=$(git -C "${APIFILE_DIR}" rev-parse HEAD | cut -c 1-10)
+       GIT_HEAD_UNIX_TIME=$(git -C "${APIFILE_DIR}" log -1 --format=%ct HEAD)
        # Get LIBINTERFACE, LIBREVISION, LIBAGE from the 'api' file.
        eval "$(grep -v "^#" "${APIFILE}" | tr -d " ")"
-       VERSION="${LIBINTERFACE}.${LIBREVISION}.${LIBAGE}-${GIT_REVISION}"
+       VERSION="${LIBINTERFACE}.${LIBREVISION}.${LIBAGE}-${GIT_HEAD_UNIX_TIME}-${GIT_HEAD_REV}"
        abi-dumper "${SO}" -o abi-"$(basename "${SO}" .so)-${VERSION}".dump -lver "${VERSION}"
-done < <(find "${TESTBIND}"/lib/*/.libs/ "${REFBIND}"/lib/*/.libs/ -name '*.so')
+done < <(find "${TESTBIND}"/lib/*/.libs/ "${REFBIND}"/lib/*/.libs/ -name '*.so' ! -name '*-nosymtbl*')
 
 # Generate HTML API compatibility reports for all libraries.
 find . -maxdepth 1 -name 'abi-*.dump' | sort | while read -r OLD; read -r NEW; do