-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github/workflows: add script to check that packages can still be
installed. This will allow us to confirm the repository's staging state in CI.
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
# | ||
# check-install.sh | ||
|
||
export XBPS_TARGET_ARCH="$2" XBPS_DISTDIR=/hostrepo | ||
|
||
if [ "$1" != "$XBPS_TARGET_ARCH" ]; then | ||
triplet="$(/hostrepo/xbps-src -a "$XBPS_TARGET_ARCH" show-var XBPS_CROSS_TRIPLET)" | ||
ROOTDIR="-r /usr/$triplet" | ||
fi | ||
|
||
ADDREPO="--repository=$HOME/hostdir/binpkgs --repository=$HOME/hostdir/binpkgs/nonfree" | ||
|
||
while read -r pkg; do | ||
for subpkg in $(xsubpkg $pkg); do | ||
/bin/echo -e "\x1b[32mTrying to install dependants of $subpkg:\x1b[0m" | ||
for dep in $(xbps-query $ADDREPO -RX "$subpkg"); do | ||
xbps-install \ | ||
$ROOTDIR $ADDREPO \ | ||
-Sny \ | ||
"$subpkg" "$(xbps-uhelper getpkgname "$dep")" | ||
if [ $? -eq 8 ]; then | ||
/bin/echo -e "\x1b[31mFailed to install '$subpkg' and '$dep'\x1b[0m" | ||
exit 1 | ||
fi | ||
done | ||
done | ||
done < /tmp/templates |