On Fri, 2011-01-07 at 19:30 +0000, Roger Leigh wrote: > > An easy fix is to start the chroot and set the Arch before before > > calling open_build_log(), which is what earlier versions of sbuild did. > > Attached is a patch to do just that. > > I'm assuming from the above that you have an i386 chroot on an amd64 > host system? > Yes.
> The arch is initially set from the host architecture. You can set this > using the --arch option, which you should arguably be doing if the > host and build arches differ. > Hmm, this used to work with 0.60.0-2, but I guess it was changed due to the issues you mention below. > Thanks for the patch. I've had a look at it, and I'm afraid it can't > be applied in its current form because it breaks cleanup on failure. > You have moved a chunk of the setup code earlier in the run() function, > but it's still using the old label. Also cleanup_log is now out of > order. > > Those can be fixed, but the order of the log opening is important. If > the build log is not open when we start the session, any errors will > not be logged correctly. They will go into the main build log rather > than the package build log. This is something we've got wrong in the > past and which caused great annoyance to the buildd admins. Even > harmless informational messages get into the main log, and these are > then spammed to the admins for each build (the main log is normally > completely empty except on failure, and this change breaks this > requirement). The intention is that the main log is only filled when > there's a major failure prior to starting or after ending a package > build, and which the buildd admin must be made aware of. > > The bug isn't in the position of open_build_log(), it's in the > misdetection of the architecture when we open the log. Yes, I should have probably explained that better -- the arch isn't properly detected when the log is opened. > Now, we have > not currently got any way of specifying this automatically; I may add a > suitable configuration option to schroot, I've been considering it for > a while. But I think that at present you should be using the --arch > option which is also used to search for the correct chroot. > > i.e. you should be using > > -d maverick --arch=i386 > > rather than > > -d maverick-386 > > since the latter also rewrites the architecture in the .changes; if > you want to specify a specific chroot, then use the --chroot option > rather than --dist. --dist specifies the exact distribution, while > --chroot specifies the build chroot (which normally defaults to a > chroot based upon the distribution and architecture set e.g. > maverick-i386-sbuild). This makes sense. I'll adjust our build scripts accordingly. Thanks for your consideration and thoughtful response.
signature.asc
Description: This is a digitally signed message part