On Thu, Feb 05, 2009 at 04:52:57PM +0100, Frans Pop wrote: >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.
Yup, sounds better. I'm hoping to reduce the number of places with arch lists as we move forwards... >> --- 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. That might work, yes. With a fallback for each of the things we're looking for; in some cases you just want to find *one* of the debs. Simply pass in a list of acceptable arches and tell the code in which_deb work it out from there? -- Steve McIntyre, Cambridge, UK. [email protected] "I can't ever sleep on planes ... call it irrational if you like, but I'm afraid I'll miss my stop" -- Vivek Dasmohapatra -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

