[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Strange buildroot behavour



--- Jeff Johnson <jbj@redhat.com> wrote:
> On Tue, Dec 31, 2002 at 07:08:10AM -0800, Valery
> Reznic wrote:
> > 
> > --- Jeff Johnson <jbj@redhat.com> wrote:
> > > On Tue, Dec 31, 2002 at 05:38:37AM -0800, Valery
> > > Reznic wrote:
> > > > I try to build rpm 
> > > > 
> > > > rpm -bb --define "buildroot /my-buildroot"
> > > foo.spec
> > > > 
> > > > and it looks like buildroot parameter from the
> > > command
> > > > line do something ONLY if spec file has line
> > > > 
> > > > Buildroot: ...
> > > > 
> > > > Without this line in the spec file buildroot
> not
> > > > depend on the command line and always "/"
> > > > 
> > > > Is it a bug or rpm should work this way ?
> > 
> > Why buildroot from command line do nothing when I
> have
> > not buildroot in the specfile ?
> > 
> 
> Because --buildroot overrides BuildRoot: in spec
> file. If you're not
> using BuildRoot: in the spec file, any value from
> the CLI is meaningless.
But in any case BuildRoot has a value: 
defaut, specified in the spec file or specified in the
macros file.
So, override specified in spec file value have a mean
and override default value is meaningless ?



> 
> There's more to do in a specfile than just specify a
> value for BuildRoot:.
> 
> > 
> > > > 
> > > > 
> > > > When I put in my spec file line
> > > > 
> > > > Buildroot: /
> > > > 
> > > 
> > > Um, this is dumb, unless you are trying to use
> rpm
> > > to clean your disk ;-)
> > It's good not only for disk clean.
> > If I want package already installed files (as I do
> in
> > the rpmrebuild) I use buildroot: / and do nothing
> in
> > clean section
> > 
> 
> Whatever. BuildRoot: / has cleaned several disks
> here at Red Hat many
> years ago (or so I'm told).
> 
> > > 
> > > Consider
> > >     %clean
> > >     rm -rf ${RPM_BUILD_ROOT}
> > > 
> > > > (i.e, make default buildroot explicit)
> > > > I can build my rpm
> > > > 
> > > > rpm -bb foo.spec
> > > > 
> > > 
> > > I don't believe this.
> > Why ?
> 
> Because I just checked:
> 
> bash$ grep BuildRoot time.spec
> BuildRoot: /
> bash$ zrpm -bb time.spec
> error: BuildRoot can not be "/": /

You are right. My test was wrong.
But why rpm allow not specified BuildRoot and stay
with default "/" ?

Happy New year.



> 
> 73 de Jeff
> 
> -- 
> Jeff Johnson	ARS N3NPQ
> jbj@redhat.com (jbj@jbj.org)
> Chapel Hill, NC
> 
> 
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/rpm-list


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []