From 3dc1cf7b286e2fff1fbb95333594d3d1a1036cb5 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Mon, 18 Apr 2022 14:57:36 -0400 Subject: [PATCH 1/2] common/travis/xpkgdiff.sh: add script to compare pkgs to previous version --- common/travis/xpkgdiff.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 common/travis/xpkgdiff.sh diff --git a/common/travis/xpkgdiff.sh b/common/travis/xpkgdiff.sh new file mode 100755 index 000000000000..3274445d6f8a --- /dev/null +++ b/common/travis/xpkgdiff.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# +# xpkgdiff.sh + +if [ "$1" != "$2" ]; then + /bin/echo -e "\x1b[33mDoes not run properly on cross\x1b[0m" +else + 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[32mFile Diff of $subpkg:\x1b[0m" + xpkgdiff -f $subpkg + /bin/echo -e "\x1b[32mMetadata Diff of $subpkg:\x1b[0m" + xpkgdiff -S $subpkg + /bin/echo -e "\x1b[32mDependency 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 +fi From e6b8e09561f4cc99dc4290bd1ceab723ba9eea88 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Mon, 18 Apr 2022 15:52:39 -0400 Subject: [PATCH 2/2] .github/workflows/build.yaml: add xpkgdiff CI step --- .github/workflows/build.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2ae7a3e728fa..3563708980ad 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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: Verify repository state run: | (