[buildd-tools-devel] Bug#657392: Bug#657392: sbuild: Automatically handle --arch=all

Roger Leigh rleigh at codelibre.net
Mon Feb 27 11:19:28 UTC 2012


On Mon, Feb 27, 2012 at 11:37:49AM +0100, Daniel Dehennin wrote:
> Daniel Dehennin <daniel.dehennin at baby-gnu.org> writes:
> 
> > Daniel Dehennin <daniel.dehennin at baby-gnu.org> writes:
> >
> > Hello,
> >
> > [...]
> >
> >> I use a little shell script wrapper to handle the architecture:all case
> >> because when reprepro list build-needing packages[1], the architecture:all
> >> is a job on its own.
> >
> > I think we could manage two different cases:
> >
> > - "sbuild -A --arch=<SOMETHING>" or "sbuild -A": like today, build
> >   architecture independent packages in addition to architecture
> >   dependent ones
> >
> > - "sbuild --arch=all": only build architecture independent packages
> >
> > This would be useful for my setup, if "--arch=all" is handled internally
> > by doing like "sbuild -A --arch=<something>", this would cause problem
> > when building "Architecture: any all" sources.
> >
> > Actually, in Debian, the architecture independent packages are build by
> > the developer who include them in his upload, the buildd only need to
> > take care of its own architecture dependent packages.
> 
> I tried to look at the code to patch it[1] but I'm a little bit lost on how
> and where to do it.
> Any hint?

I would probably do this in Sbuild::Build, at the very start when
we're setting host/build stuff.  The information is in Sbuild::Conf.

Something like:

if ($self->get('Host Arch') eq 'all') {
  $self->set_conf('BUILD_ARCH_ALL', 1);
  $self->set('Host Arch', $self->get_conf('ARCH'));
}

However, I don't really like this.  --host and --build have defined
meanings, and this is altering that.  If you use --arch=all (sets
host and build), you've set it to an invalid arch.  What should we
now use as the correct arch?  Above, I've defaulted it to the native
system architecture.  But that might not be correct in all cases, and
we now don't have a sensible means to specify the correct values.

I think the existing behaviour does the right thing here.  I'm not
yet convinced that this is something sbuild should be doing.  It's
really rebuildd's job to pass the right options, IMHO.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800





More information about the Buildd-tools-devel mailing list