Re: mock build results for same .spec build different for local & online/COPR builds -- local OK, @copr FAILS ?

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

 



Le vendredi 03 juillet 2020 à 08:24 -0700, PGNet Dev a écrit :
> 
> 
> On 7/3/20 12:01 AM, Nicolas Mailhot wrote:
> > You added some processing that depends on the git command (that
> > forgemeta does not use) but forgot to BuildRequire the package
> > providing that command.
> 
> It's _clearly_ already added in my referenced spec:
> 
> 	BuildRequires:     git

Then you probably hit one of the cases where the SRPM is prepared
before the full buildroot is assembled.

That means you may need to make sure to enable the container option in
copr (it’s default in mock now but IIRC copr lags a bit) and probably
add some conditionals to your code so it does not error out if executed
before the full buildroot is assembled.

Generally speaking, there’s no reason a spec that buildrequires
everything it needs should not execute in mock or copr, but you have to
be extra careful with preamble macros, because preamble macros are not
executed once but multiple times during a build.

Because BuildRequires can be generated rpmbuild needs to execute the
preamble to check what BuildRequires exist, therefore a preamble macro
should fail gracefully when one of its BuildRequires is not available
yet.

(A good way to discover how convoluted this part is is to add some
%{echo: markers in a working spec and look when the echoes trigger in a
full mock/copr build).

If you don’t care you can force a specific buildroot in mock/corp
configuration, of course.

> > dead stupid (so stupid
> 
> Let's chalk that up this time to 'lost in translation', shall we?

That was a compliment, actually, the only reason the humain brain does
not see stupid mistakes is that you’re asking it to operate at another
level. Computers are dumb as a brick and have no problem seeing all the
dumb little things the humain brain optimises away.

> There _is_ no "so oriented" or "always" workflow.  

You’re formatted like we all are by your past experiences. Just because
you did not read about a pattern in a book, does not mean you are not
following a pattern, because you’ve been exposed to the work of others
that followed the same pattern (knowingly or not).

Regar,ds


-- 
Nicolas Mailhot
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux