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

Re: cache compare



On Sun, 13 May 2007 21:48:30 +0200
"Hector Oron" <hector.oron@gmail.com> wrote:

> Hello Neil,

This can probably go on the list.

> I wanted to use cache compare to automate buildcross and build
> unsynced toolchain packages. I have been looking that cachecompare,
> compares amb outputs to a html for an specific suite.

I have changes for cachecompare that need further testing. That is one
problem with using scripts direct from svn under cron - if the commit
is broken, the results are live.

> What method would you recommend me to use a cachecomparison for a
> certain package?

In theory, it only needs a very short perl script - connect to the
sqlite, read the source package name, read the emdebian version string,
call apt-cache for the source package and read the version. It's easy
because you already know the distribution, .deb architecture and
cross-build arch before thinking about the query. cachecompare is more
complex because it tries to keep track of all those differences
and correlate them into a variety of output formats rather than just
dumping to the terminal.

However, problems arise when you try to analyse the results (which is
another area that increases the complexity of cachecompare):

select Source, Version, Distribution, Architecture from tools where Package = "gcc-4.0-mips-linux-gnu";
gcc-4.0|4.0.3-7|testing|i386
gcc-4.0|4.0.3-7|unstable|i386
gcc-4.0|4.0.3-7|testing|amd64
gcc-4.0|4.0.3-7|unstable|amd64

That's something that needs to be added to the web PHP too - just not
quite sure of the best way to do the apt-cache operation in PHP.

This doesn't mean that the retrieved source version can be cross-built
- you need to check the Architecture specific cache to see if that
version exists as a binary before trying to build. (cachecompare needs
to improve in this area too.)

There are a few gremlins too:
select Source, Version, Distribution, Architecture from tools where Package = "gcc-4.1-mips-linux-gnu";
gcc-4.1 (4.1.1ds2-21)|4.1.1-21|testing|i386
gcc-4.1 (4.1.1ds2-21)|4.1.1-21|unstable|i386
gcc-4.1 (4.1.1ds2-21)|4.1.1-21|testing|amd64
gcc-4.1 (4.1.1ds2-21)|4.1.1-21|unstable|amd64

Ensure you pattern match the Source string to split on spaces and be
careful with absolute matches for the version string.

> Should i read it from the html or could you update
> cachecompare to compare a Debian package with Emdebian's one
> (cachecompare should take a parameter with package name).

cachecompare would be overkill for that task.

cachecompare does these queries repeatedly but not in a way that is
easily adapted for isolating a single query (so that it can provide the
various levels of output).

The revised version that I'm testing writes out a log that can be
called to build each set of packages. e.g. it identifies the arguments
to pass to buildcross like '4.1 m68k' etc., split into commands for the
i386 chains and the amd64 chains. I can modify that output to any
particular selection that you need. Then the automation can take one
line at a time (I have a parser script is designed to do that job, just
need to finish it.)

OK, I've created a branch:

http://buildd.emdebian.org/svn/browser/current/emdebian/trunk/repo/branches/automation-branch

It has the revised cachecompare and a parser script that I'm testing.
Neither is ready for trunk/ or for much more than testing at the
moment. It's just so that we can both use the same code for further
work.

The revised version also implements edos-debcheck into the output. The
next stage is to implement that for our stable toolchains and for the
target repository.

I've got some more fixes to put into emdebian-tools 0.2.2 to support
automated building of target packages then I'll continue on
cachecompare.

To be honest, I'd left this whole issue on one side for a while because
gcc-4.1 still doesn't build for arm so I'm not sure there is much for
buildcross to do at the moment. Even if we rebuild the toolchains for
the other architectures, it'll only mean doing it again when gcc-4.1 is
fixed.

--


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgpAdHq3AFdCa.pgp
Description: PGP signature


Reply to: