On Thursday 05 February 2009, Jonathan Hall wrote: > Index: debian-cd/tools/update_tasks > =================================================================== > --- debian-cd/tools/update_tasks (revision 7407) > +++ debian-cd/tools/update_tasks (revision 7487) > @@ -1,5 +1,6 @@ > #!/bin/sh > set -e > +ARCHES="alpha arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc > s390 sparc amd64" [...] > -# We need to gunzip a copy of the appropriate Packages.gz file > -# Assume i386, use the $CODENAME main Packages file > +# We need to gunzip a copy of the appropriate Packages.gz file(s) > +# Find an arch that exists in our mirror... > +for arch in $ARCHES; do > + if [ -e $MIRROR/dists/$CODENAME/main/binary-$arch ]; then break; > fi > +done
Wouldn't it be much simpler to use tools/which_deb instead? That would also avoid having arch lists (which will need to be updated!) all over the place. > --- debian-cd/tools/which_deb (revision 7407) > +++ debian-cd/tools/which_deb (revision 7487) Wouldn't it make much more sense for which_deb to just try the current arch(es) (the one(s) for which we're building the image) instead of trying arches randomly? Or at least to try relevant arches first? This will limit the use of the script a bit, but as it is currently only called from boot-* scripts it isn't a problem. If it is also called from update_tasks it should still not be a problem, though in that case ARCH will not yet be set and you'd have to take ARCHES. Maybe ARCH/ARCHES should be passed as a parameter instead of being hardcoded.
signature.asc
Description: This is a digitally signed message part.