xbps-src: work around autodeps removal needing multiple passes
This commit is contained in:
parent
90f5f8ffe1
commit
0a38409da6
2 changed files with 27 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
# vim: set ts=4 sw=4 et:
|
||||
|
||||
remove_pkg_cross_deps() {
|
||||
local rval= tmplogf=
|
||||
local rval= tmplogf= prevs=0
|
||||
[ -z "$XBPS_CROSS_BUILD" ] && return 0
|
||||
|
||||
cd $XBPS_MASTERDIR || return 1
|
||||
|
@ -14,7 +14,18 @@ remove_pkg_cross_deps() {
|
|||
fi
|
||||
|
||||
$XBPS_REMOVE_XCMD -Ryo > $tmplogf 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
rval=$?
|
||||
while [ $rval -eq 0 ]; do
|
||||
local curs=$(stat -c %s $tmplogf)
|
||||
if [ $curs -eq $prevs ]; then
|
||||
break
|
||||
fi
|
||||
prevs=$curs
|
||||
$XBPS_REMOVE_XCMD -Ryo >> $tmplogf 2>&1
|
||||
rval=$?
|
||||
done
|
||||
|
||||
if [ $rval -ne 0 ]; then
|
||||
msg_red "${pkgver:-xbps-src}: failed to remove autocrossdeps:\n"
|
||||
cat $tmplogf && rm -f $tmplogf
|
||||
msg_error "${pkgver:-xbps-src}: cannot continue!\n"
|
||||
|
|
|
@ -44,27 +44,36 @@ pkg_available() {
|
|||
}
|
||||
|
||||
remove_pkg_autodeps() {
|
||||
local rval= tmplogf=
|
||||
local rval= tmplogf= errlogf= prevs=
|
||||
|
||||
cd $XBPS_MASTERDIR || return 1
|
||||
msg_normal "${pkgver:-xbps-src}: removing autodeps, please wait...\n"
|
||||
tmplogf=$(mktemp) || exit 1
|
||||
errlogf=$(mktemp) || exit 1
|
||||
|
||||
remove_pkg_cross_deps
|
||||
$XBPS_RECONFIGURE_CMD -a >> $tmplogf 2>&1
|
||||
echo yes | $XBPS_REMOVE_CMD -Ryod >> $tmplogf 2>&1
|
||||
prevs=$(stat -c %s $tmplogf)
|
||||
echo yes | $XBPS_REMOVE_CMD -Ryod 2>> $errlogf 1>> $tmplogf
|
||||
rval=$?
|
||||
if [ $rval -eq 0 ]; then
|
||||
echo yes | $XBPS_REMOVE_CMD -Ryod >> $tmplogf 2>&1
|
||||
while [ $rval -eq 0 ]; do
|
||||
local curs=$(stat -c %s $tmplogf)
|
||||
if [ $curs -eq $prevs ]; then
|
||||
break
|
||||
fi
|
||||
prevs=$curs
|
||||
echo yes | $XBPS_REMOVE_CMD -Ryod 2>> $errlogf 1>> $tmplogf
|
||||
rval=$?
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $rval -ne 0 ]; then
|
||||
msg_red "${pkgver:-xbps-src}: failed to remove autodeps: (returned $rval)\n"
|
||||
cat $tmplogf && rm -f $tmplogf
|
||||
cat $errlogf && rm -f $errlogf
|
||||
msg_error "${pkgver:-xbps-src}: cannot continue!\n"
|
||||
fi
|
||||
rm -f $tmplogf
|
||||
rm -f $errlogf
|
||||
}
|
||||
|
||||
remove_pkg_wrksrc() {
|
||||
|
|
Loading…
Reference in a new issue