[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: From emsource -b to emsandbox

On Wed, 2008-03-19 at 10:43 +0000, David Goodenough wrote:
> I looked at the autobuild script that is in the documentation, and I think it
> is wrong (or at least missing something).

(an update for the changes within emsandbox)

> So I changed it to read:-
> >>>>>>>>>>>>>>>>>>>>>>>
> #!/bin/bash
> #set -x
> . /usr/share/debootstrap/functions
> SCRIPT=/usr/lib/emdebian-tools/emdebian.crossd
> 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))


$sources no longer exists in the suite scripts, it's too much of a
maintenance headache. Instead, emsource uses the apt-cross cache to work
out which source package provides the requested binary. The problem then
is removing the duplicates where the suite script needs only two of many
binaries built from one source package to prevent emsource having to
build the same source twice.

> for pkg in $sourcesX; do
>     sources=`apt-cache showsrc $pkg | grep Package | awk "{print \\$2}" |
> sort | uniq`

You could use the apt-cross cache here, you should certainly not use the
main system cache. Otherwise you will miss packages where Emdebian makes
a new package split. e.g. debconf does not provide debconf-shell in the
main Debian apt cache, only in the Emdebian cache. True, this is only
because of the bug in cdebconf but still, debconf-shell is needed to
actually get an emsandbox package set that can be installed as cdebconf
cannot be used without the Emdebian debconf-shell package (at least
until the cdebconf bug is fixed).

> 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. 

You just need to work with the apt cache from the Emdebian repository,
not the Debian mirrors and get your showsrc from that.

>  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.

The example was just that - a beginning. Thanks for working on it.

> 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. 

man reprepro

Don't generate the tree manually, do it with reprepro and make it easy
to maintain.

>  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.

You need to run edos-debcheck against it too so you'll need Packages.gz,
Release etc. i.e. a normal apt mirror. reprepro runs the Emdebian
repositories and the scripts all expect that level of support so it's
best to use reprepro so that you don't get surprises from debootstrap.


Neil Williams

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: