Skip to content

Commit a85ceb7

Browse files
committed
make xbps-checkvers version check look for version >=0.54
1 parent 5a6ab97 commit a85ceb7

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

configure

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,18 @@ if [ $rval -ne 0 ]; then
110110
echo "ERROR: xbps-checkvers exited with an error: $rval"
111111
exit 1
112112
fi
113-
if "$RCV" -V | grep "XBPS: 0.54" 1>/dev/null 2>&1; then
114-
cut -d' ' -f1 "$RCV_F" >pkgs.txt
115-
else
116-
grep pkgname "$RCV_F" | awk '{ print $2 }' >pkgs.txt
117-
fi
113+
114+
xbps-uhelper pkgmatch "xbps-$($RCV -V | cut -d' ' -f2)_1" 'xbps>=0.54_1'
115+
case "$?" in
116+
0) # version < 0.54
117+
grep pkgname "$RCV_F" | awk '{ print $2 }' >pkgs.txt ;;
118+
1) # version >= 0.54
119+
cut -d' ' -f1 "$RCV_F" >pkgs.txt ;;
120+
*)
121+
echo "ERROR: couldn't determine xbps-checkvers version"
122+
exit 1
123+
;;
124+
esac
118125

119126
printf "INFO: Creating source targets...\n"
120127
rm -rf tobuild built

0 commit comments

Comments
 (0)