autoport: find_requirements(): fix parsing for 'is needed by'
This commit is contained in:
parent
f5d91a52fc
commit
14d27be655
17
autoport
17
autoport
@ -198,25 +198,18 @@ function find_requirements() {
|
|||||||
local OUTFILE=$1
|
local OUTFILE=$1
|
||||||
|
|
||||||
if [ "`grep " is needed by " $OUTFILE`" ]; then
|
if [ "`grep " is needed by " $OUTFILE`" ]; then
|
||||||
grep " is needed by " $OUTFILE | while read line; do
|
grep " is needed by " $OUTFILE | awk '{ print $1 }' | tr -d \' > $tf1
|
||||||
set -- $line
|
|
||||||
if [ "$2" = "=" -o "$2" = ">=" ]; then
|
|
||||||
awk '{ print $1#$3 }' | sort -u > $tf1
|
|
||||||
else
|
|
||||||
awk '{ print $1 }' | sort -u > $tf1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
elif [ "`grep " matches no packages" $OUTFILE`" ]; then
|
elif [ "`grep " matches no packages" $OUTFILE`" ]; then
|
||||||
grep " matches no packages" $OUTFILE | awk '{ print $2 }' | tr -d \' | sort -u > $tf1
|
grep " matches no packages" $OUTFILE | awk '{ print $2 }' | tr -d \' > $tf1
|
||||||
elif [ "`grep " no package provides " $OUTFILE`" ]; then
|
elif [ "`grep " no package provides " $OUTFILE`" ]; then
|
||||||
grep " no package provides " $OUTFILE | sed "s|.* no package provides ||" | sort -u > $tf1
|
grep " no package provides " $OUTFILE | sed "s|.* no package provides ||" > $tf1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ `stat -c %s $tf1` -gt 0 ] && {
|
[ `stat -c %s $tf1` -gt 0 ] && {
|
||||||
echo -n " | missing requirements: "
|
echo -n " | missing requirements: "
|
||||||
> $tf
|
> $tf
|
||||||
cat $tf1 | while read line; do
|
sort -u $tf1 | while read line; do
|
||||||
REQ=`find_source_by_provide $PORT_REPOSITORY $line`
|
REQ=`find_source_by_provide $PORT_REPOSITORY ${line}`
|
||||||
[ "$REQ" ] && \
|
[ "$REQ" ] && \
|
||||||
echo "${REQ}" >> $tf || \
|
echo "${REQ}" >> $tf || \
|
||||||
echo -n "$line(unresolved) "
|
echo -n "$line(unresolved) "
|
||||||
|
Loading…
Reference in New Issue
Block a user