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
|
||||
|
||||
if [ "`grep " is needed by " $OUTFILE`" ]; then
|
||||
grep " is needed by " $OUTFILE | while read line; do
|
||||
set -- $line
|
||||
if [ "$2" = "=" -o "$2" = ">=" ]; then
|
||||
awk '{ print $1#$3 }' | sort -u > $tf1
|
||||
else
|
||||
awk '{ print $1 }' | sort -u > $tf1
|
||||
fi
|
||||
done
|
||||
grep " is needed by " $OUTFILE | awk '{ print $1 }' | tr -d \' > $tf1
|
||||
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
|
||||
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
|
||||
|
||||
[ `stat -c %s $tf1` -gt 0 ] && {
|
||||
echo -n " | missing requirements: "
|
||||
> $tf
|
||||
cat $tf1 | while read line; do
|
||||
REQ=`find_source_by_provide $PORT_REPOSITORY $line`
|
||||
sort -u $tf1 | while read line; do
|
||||
REQ=`find_source_by_provide $PORT_REPOSITORY ${line}`
|
||||
[ "$REQ" ] && \
|
||||
echo "${REQ}" >> $tf || \
|
||||
echo -n "$line(unresolved) "
|
||||
|
Loading…
Reference in New Issue
Block a user