Skip to content

Commit d395e17

Browse files
AZP: Dry-run install of built packages to catch packaging regressions - v1.21.x (#11404)
* AZP: Install built packages to catch packaging regressions Signed-off-by: Alexey Rivkin <arivkin@nvidia.com> * AZP: Skip RPM install dry-run when rpm db is unreadable On euleros2sp12 and kylin10sp3 the system rpm db at /var/lib/rpm is locked down for non-root, so 'rpm -Uvh --test' fails when opening the db before it can validate the package. Probe with 'rpm -q rpm' and skip the install test when the db is unreadable, so the check still runs everywhere it can without hard-failing the build on those two distros. Also mark the task as SucceededWithIssues so the skip surfaces as a yellow row in the build summary instead of hiding behind a green pass. Signed-off-by: Alexey Rivkin <arivkin@nvidia.com> --------- Signed-off-by: Alexey Rivkin <arivkin@nvidia.com>
1 parent ac3399f commit d395e17

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

buildlib/tools/builds.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ build_release_pkg() {
8383
cd $subdir
8484
dpkg-buildpackage -us -uc
8585
)
86+
echo "==== Test install DEB (dry-run) ===="
87+
apt-get install -s -y ./*.deb
8688
else
8789
echo "==== Build RPM ===="
8890
echo "$PWD"
@@ -91,6 +93,13 @@ build_release_pkg() {
9193
azure_log_error "Release build depends on CUDA while it should not"
9294
exit 1
9395
fi
96+
echo "==== Test install RPM (dry-run) ===="
97+
if rpm -q rpm >/dev/null 2>&1; then
98+
rpm -Uvh --test ${PWD}/rpm-dist/*/*.rpm
99+
else
100+
azure_log_warning "Skip RPM install test: rpm db not readable as non-root"
101+
azure_complete_with_issues "Skip RPM install test: rpm db not readable as non-root"
102+
fi
94103
echo "==== Build debug RPM ===="
95104
${WORKSPACE}/contrib/buildrpm.sh -s -b -d --nodeps --define "_topdir $PWD/debug"
96105
fi

0 commit comments

Comments
 (0)