From emsource -b to emsandbox
I looked at the autobuild script that is in the documentation, and I think it
is wrong (or at least missing something).
So I changed it to read:-
>>>>>>>>>>>>>>>>>>>>>>>
#!/bin/bash
#set -x
. /usr/share/debootstrap/functions
SCRIPT=/usr/lib/emdebian-tools/emdebian.crossd
. $SCRIPT
work_out_debs
requiredX=$(echo $(echo $required | tr ' ' '\n' | sort | uniq))
baseX=$(echo $(echo $base | tr ' ' '\n' | sort | uniq))
echo "Trying to automate rebuilds of rootfs packages:"
sources=`echo $requiredX $baseX | fold -s`
if [ -z "$sources" ]; then
echo "$PROG: no source list found in $SCRIPT"
fi
sourcesX=$(echo $(echo $sources | tr ' ' '\n' | sort | uniq))
for pkg in $sourcesX; do
sources=`apt-cache showsrc $pkg | grep Package | awk "{print \\$2}" |
sort | uniq`
# need to extract the second token from each line, sort and uniq.
for src in $sources; do
if emsource -b $src
then
echo "emsource complete"
else
echo "Bad return from emsource"
break
fi
done
done
>>>>>>>>>>>>>>>>>
The location of debbootstrap/functions seems to be different from that
given in the documentation, and the original script never builds either
$sources or $src. So I assumed that sources is simply requiredX and
baseX concatenated, and added some code to extract the source package
name from the apt-cache | grep function, and eliminate duplicaets. I
also put some error checking on the emsource run, so that if any build
fails I can see what happened. Obviously the first line in the first
for loop has wrapped in the above text.
Now I have a trunk tree trunck/<letter>/<package>/trunk/<deb-file> files
and I need to convert this into something that emsandbox will use as a
proxy. Does anyone have a script that will do this conversion. I
guess I can use dpkg-scanpackages along the way but I am not sure
of what else I need to do along the way.
David
Reply to: