[Rpm-maint] [PATCH] rpmbuild: clean up buildroot handling, set a default buildroot

Michael Schroeder mls at suse.de
Tue Feb 13 16:50:06 UTC 2007


On Tue, Feb 13, 2007 at 11:30:36AM -0500, Bill Nottingham wrote:
> Michael Schroeder (mls at suse.de) said: 
> > On Mon, Feb 12, 2007 at 03:37:23PM -0500, Bill Nottingham wrote:
> > > +    /* If buildroot is not set, set to a default value. */
> > > +    if (!spec->gotBuildRootURL) {
> > > +        int err = setBuildRoot(spec, "%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)");
> > > +        
> > > +        if (err)
> > > +            return err;
> > > +    }
> > 
> > If you can set a default buildroot in /usr/lib/rpm/macros, why
> > is there a need to *insist* on a buildroot? This breaks
> > compatibility.
> 
> This would only trigger if:
> 
> a) no default buildroot is passed via --buildroot
> b) no default buildroot is set via macros
> c) there is no BuildRoot: line in the spec file

Right.

> Is having a default (rather than *no*) buildroot in that case behavior that
> we want to preserve?

IMHO yes, that's why there is a config file where local policies can
be set.

Cheers,
  Michael.

-- 
Michael Schroeder                                   mls at suse.de
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}



More information about the Rpm-maint mailing list