On Fri, 2006-07-21 at 16:48 -0400, Joe Todaro wrote:
Hey Dan,
Great news. We *fixed* the plague-0.5 "depsolve" problem with a minor
change to the PackageJob.py module. See below...
>> On Tue, 2006-07-04 at 09:58 -0400, Joe Todaro wrote:
>>
>> Hi,
>> I'm having a problem *not* being able to build 'i686' packages
(i.e.
>> optional_arches=i686) anymore *after* having upgraded our plague
>> server/builder (Opteron x86_64) a couple of weeks ago from
>> plague-0.4.3 to *plague-0.5.0*. The problem happens only with i686
>> (optional_arches=i686) -- not with i386 (base_arches=i386) which
>> continues to work flawlessly.
> Dan Williams <dcbw(a)redhat.com> wrote on 07/19/2006 02:07:05 PM:
> Ok, can you apply the attached patch?
> cd to /usr/share/plague/server
> and use 'patch -p0 < patchfile'.
> Enqueue the WhoAmI SRPM and let me
> know what it prints out.
>
------- snip - snip ------
>
> Ok; this tells me that the PackageJob class' arch_handling()
function is
> working as expected. It also tells me that the depsolve stuff is
> picking the wrong arches to depsolve. So we're closer in some
senses to
> fixing the issue, but farther away in others :)
>
In _write_yum_conf() we changed:
mock_config = self._target_cfg.mock_config_for_arch(arch)
to:
mock_config =
self._target_cfg.mock_config_for_arch(ArchUtils.sub_arches[arch])
*that* did the trick! ... our new (plague-0.5 based) buildsys is
up and running the same as it was *before* we upgraded from
plague-0.4.
So, please _confirm_ the above change - that it's *really* what you
intended to do? If it is, I will be happy to re-test the code
after you commit the changes to the CVS HEAD.
Yes, that looks correct. Usually we won't have a mock config file for
arches like i686 or em64t, since it's assumed that if you have a builder
for the sub-arch, you can build the whole list of arches, usually.
That's a somewhat erroneous assumption, but in reality, if you have an
i386-class machine, it's _not_ actually going to be an i386 from 1992 :)
I've committed a patch to HEAD that will try the specified arch (just in
case you do, in fact, have mock configs for the specific build arch) and
then if there's no mock config for that arch, will fall back to the base
architecture like your change above. Thanks for the pointer. Patch
attached.
Dan
Well, thanks again for all your help, especially for clarifying some
of the key Plague buildsystem design points, without which it would
have been impossible to debug/resolve the above "depsolve" issue.
Also, this provided the opportunity to dig into some well-written
Python code and do some serious debugging. Thanks again!
Regards,
Joe Todaro
=============== HERE"S THE COMPLETE THREAD ==============
Dan Williams <dcbw(a)redhat.com> wrote on 07/19/2006 02:07:05 PM:
> On Wed, 2006-07-19 at 13:09 -0400, Joe Todaro wrote:
> >
> > Dan Williams <dcbw(a)redhat.com> wrote on 07/19/2006 10:07:54 AM:
> >
> > > On Mon, 2006-07-17 at 18:49 -0400, Joe Todaro wrote:
> > > > DW> and on the server, which has _no_ architecture at all,
you'd
> > have
> > > > DW> in /etc/plague/server/targets:
> > > > DW>
> > > > DW> fedora-devel-core.cfg
> > > > DW> fedora-5-core.cfg
> > > > DW> fedora-4-core.cfg
> > > > DW> fedora-devel-extras.cfg
> > > > DW> fedora-5-extras.cfg
> > > > DW> fedora-4-extras.cfg
> > > > DW>
> > > > DW> and on the server, if you care about depsolving (ie if you
> > have
> > > > the
> > > > DW> "depsolve_jobs = yes" set
> > in /etc/plague/server/plague-server.cfg)
> > > > then
> > > > DW> you actually do need mock target configs for everything
too,
> > > > DW> because the server will use those to depsolve.
> > > >
> > > > Absolutely, we do care about depsolving..
> > > >
> > > > So, when you say "everything", does that also include (for
> > example)
> > > > 'i686' now, too, regardless of the fact that i686 is still
only a
> >
> > > > sub-architecture?
> > >
> > > No; you only need mock and builder configs for base
architectures
> > like
> > > i386, x86-64, ppc, sparc, sparc64, ppc64, etc.
> > >
> > > > DW> Do you really _want_ this to
> > > > DW> build as an i686 package?
> > > >
> > > > No, of course not - this is a noarch only package, and always
> > > > has been.
> > > >
> > > > DW> If so, I think the "BuildArch: noarch" is
> > > > DW> wrong then. Typically, if you want a package to build
noarch,
> > you
> > > > DW> specify "BuildArch: noarch" and it will then only
build on
> > > > noarch. What
> > > > DW> arch is this package supposed to be for, exactly?
> > > >
> > > > 'noarch' as is specified in the specfile.
> > >
> > > Ok, can you apply the attached patch? cd
> > to /usr/share/plague/server
> > > and use 'patch -p0 < patchfile'. Enqueue the WhoAmI SRPM and
let me
> > > know what it prints out.
> >
> > Yes, I have applied the patch and re-enqueued the WhoAmI SRPM.
> > Below are the results. Hope you find something - good luck..
> > And, thanks a lot for all the help you've been providing me,
> > which is very much appreciated.
> >
> > =====================================
> > below from /var/log/plague-server.log
> > =====================================
> > Request to enqueue 'WhoAmI' tag
> > '/afs/pok/projects/.../SRPMS/whoami/WhoAmI-4.00-9_rhel4.src.rpm'
for
> > target 'ao100' (user 'jstodaro(a)abc.com')
> > 630 (WhoAmI): Starting tag
> > '/afs/pok/projects/.../SRPMS/whoami/WhoAmI-4.00-9_rhel4.src.rpm'
on
> > target 'lnxaddons-100-install'
> > 630 (WhoAmI): AH: ba ['noarch'], exclusive [], exclude []
> > 630 (WhoAmI): AH: addl_arches []
> > 630 (WhoAmI): AH: base_arches ['i386', 'i686']
> > 630 (WhoAmI): archjobs: {'noarch': None}, pkg_arches: None,
allowed:
> > None
>
> Ok; this tells me that the PackageJob class' arch_handling()
function is
> working as expected. It also tells me that the depsolve stuff is
> picking the wrong arches to depsolve. So we're closer in some
senses to
> fixing the issue, but farther away in others :)
>
> Dan
>
> > 630 (WhoAmI): Requesting depsolve...
> > 630 (WhoAmI): Starting depsolve for arches: ['i386', 'i686'].
> > 630 (WhoAmI/i686): Depsolve Error: WARNING: bad yum config for
arch
> > i686.
> > Exception in thread PackageJob: 630/WhoAmI:
> > Traceback (most recent call last):
> > File "/usr/lib64/python2.3/threading.py", line 436, in
__bootstrap
> > self.run()
> > File "/usr/share/plague/server/PackageJob.py", line 86, in run
> > self._pkg_job.process()
> > File "/usr/share/plague/server/PackageJob.py", line 725, in
process
> > if func():
> > File "/usr/share/plague/server/PackageJob.py", line 593, in
> > _stage_depsolve
> > if self._arch_deps_solved(arch) == False:
> > File "/usr/share/plague/server/PackageJob.py", line 546, in
> > _arch_deps_solved
> > if base:
> > UnboundLocalError: local variable 'base' referenced before
assignment
> >
> > Re-activating builder 'https://lnxbuild1.abc.com:8888'.
> > =====================================
> > above from /var/log/plague-server.log
> > =====================================
> >
> > > I tried running a noarch package through this
> > > morning and it seemed to go through fine; plague decided that
> > 'noarch'
> > > was the only arch it was going to build for, even with i686 in
the
> > > optional_arches for that target.
> > >
> > > > JT> > ======================================
> > > > JT> > Excerpt from lnxaddons-100-install.cfg
> > > > JT> > ======================================
> > > > JT> >
> > > > JT> > -----------<snip>------------
> > > > JT> > [Arches]
> > > > JT> > base_arches=i386
> > > > JT> > optional_arches=i686 noarch
> > > > JT> >
> > > >
> > > > GW> Ok; I think this is the cause of the noarch problem.
Since
> > > > 'noarch' is
> > > > GW> a base architecture in itself, you don't need it in
> > > > optional_arches. If
> > > > GW> you remove it, I think things will work as you expect.
> > > >
> > > > Nope - no such luck; I have removed 'noarch' from
> > 'optional_arches',
> > > > re-tested, and am still seeing that same error..
> > >
> > > noarch shouldn't be in optional_arches, but if it's not working
> > > correctly when you remove it there's some other issue.
> > >
> > > Dan
> > >
> > > [attachment "print-archhandling.patch" deleted by Joe
> > > Todaro/Poughkeepsie/IBM]
>