common/travis/xpkgdiff.sh: add CI script to compare pkgs with xpkgdiff

This commit is contained in:
classabbyamp 2022-04-18 14:57:36 -04:00 committed by Echo
parent 7c40db1483
commit 1c953b4173
2 changed files with 32 additions and 0 deletions

View File

@ -94,6 +94,14 @@ jobs:
"$here/common/travis/show_files.sh" "$BOOTSTRAP" "$ARCH"
)
- name: Compare to previous
run: |
(
here="$(pwd)"
cd /
"$here/common/travis/xpkgdiff.sh" "$BOOTSTRAP" "$ARCH"
)
- name: Check file conflicts
if: matrix.config.arch == 'x86_64' # the arch indexed in xlocate
run: |

24
common/travis/xpkgdiff.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/sh
#
# xpkgdiff.sh
export XBPS_TARGET_ARCH="$2" XBPS_DISTDIR=/hostrepo XBPS_HOSTDIR="$HOME/hostdir"
export DIFF='diff --unified=0 --report-identical-files --suppress-common-lines
--color=always --label REPO --label BUILT'
while read -r pkg; do
for subpkg in $(xsubpkg $pkg); do
if xbps-query --repository=$HOME/hostdir/binpkgs \
--repository=$HOME/hostdir/binpkgs/nonfree \
-i "$subpkg" >&/dev/null; then
/bin/echo -e "\x1b[34mFile Diff of $subpkg:\x1b[0m"
xpkgdiff -f $subpkg
/bin/echo -e "\x1b[34mMetadata Diff of $subpkg:\x1b[0m"
xpkgdiff -S $subpkg
/bin/echo -e "\x1b[34mDependency Diff of $subpkg:\x1b[0m"
xpkgdiff -x $subpkg
else
/bin/echo -e "\x1b[33m$subpkg wasn't found\x1b[0m"
fi
done
done < /tmp/templates