All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] check whether multiple versions of the same PN are due
@ 2013-09-02 13:47 Robert Yang
  2013-09-02 13:47 ` [PATCH 1/1] runqueue.py: check whether multiple versions of the same PN are due to be built Robert Yang
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Yang @ 2013-09-02 13:47 UTC (permalink / raw)
  To: bitbake-devel

This is used for fixing such a race issue:

$ bitbake make-3.81 make-3.82

There would be unexpected errors in the past, now, it will print the error
message and exit:

ERROR: Multiple .bb files are due to be built which each provide make (xxx)
 This usually means one provides something the other doesn't and should.
ERROR: Multiple versions of make are due to be built.

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

// Robert

The following changes since commit c7994f83baa678a4670472e1f037bfc16cb1e3be:

  bitbake: runqueue: Fix scenequeue to pass file descriptors, not a float (2013-09-02 09:16:24 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib robert/same_pn
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/same_pn

Robert Yang (1):
  runqueue.py: check whether multiple versions of the same PN are due to be built

 bitbake/lib/bb/runqueue.py |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

-- 
1.7.10.4



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] runqueue.py: check whether multiple versions of the same PN are due to be built
  2013-09-02 13:47 [PATCH 0/1] check whether multiple versions of the same PN are due Robert Yang
@ 2013-09-02 13:47 ` Robert Yang
  2013-09-09 15:29   ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Yang @ 2013-09-02 13:47 UTC (permalink / raw)
  To: bitbake-devel

There would be an race issue if we:

$ bitbake make-3.81 make-3.82

This because they are being built at the same time which would cause
unexpected problems, for example:

[snip]
ERROR: Package already staged (/path/to/tmp/sstate-control/manifest-qemux86-make.populate-sysroot)?!
ERROR: Function failed: sstate_task_postfunc
[snip]

Or there would be python's strack trace such as:

[snip]
 *** 0004:    mfile = open(manifest)
     0005:    entries = mfile.readlines()
     0006:    mfile.close()
     0007:
     0008:    for entry in entries:
Exception: IOError: [Errno 2] No such file or directory: xxx
[snip]

[YOCTO #5094]

I think that we can quite earlier to fix the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 bitbake/lib/bb/runqueue.py |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 0700a5b..c77cb85 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -702,7 +702,17 @@ class RunQueueData:
                 else:
                     msg += "\n This usually means one provides something the other doesn't and should."
                     logger.error(msg)
-
+                # Check whether multiple versions of the same PN are due to be
+                # built, for example:
+                # <pn>-1.0
+                # <pn>-2.0
+                seen_pn = []
+                for fn in prov_list[prov]:
+                    pn = self.dataCache.pkg_fn[fn]
+                    if pn not in seen_pn:
+                        seen_pn.append(pn)
+                    else:
+                        bb.fatal("Multiple versions of %s are due to be built." % pn)
 
         # Create a whitelist usable by the stamp checks
         stampfnwhitelist = []
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] runqueue.py: check whether multiple versions of the same PN are due to be built
  2013-09-02 13:47 ` [PATCH 1/1] runqueue.py: check whether multiple versions of the same PN are due to be built Robert Yang
@ 2013-09-09 15:29   ` Richard Purdie
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2013-09-09 15:29 UTC (permalink / raw)
  To: Robert Yang; +Cc: bitbake-devel

On Mon, 2013-09-02 at 09:47 -0400, Robert Yang wrote:
> There would be an race issue if we:
> 
> $ bitbake make-3.81 make-3.82
> 
> This because they are being built at the same time which would cause
> unexpected problems, for example:
> 
> [snip]
> ERROR: Package already staged (/path/to/tmp/sstate-control/manifest-qemux86-make.populate-sysroot)?!
> ERROR: Function failed: sstate_task_postfunc
> [snip]
> 
> Or there would be python's strack trace such as:
> 
> [snip]
>  *** 0004:    mfile = open(manifest)
>      0005:    entries = mfile.readlines()
>      0006:    mfile.close()
>      0007:
>      0008:    for entry in entries:
> Exception: IOError: [Errno 2] No such file or directory: xxx
> [snip]
> 
> [YOCTO #5094]
> 
> I think that we can quite earlier to fix the problem.
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>

I've merged this although I did move the code and change the error
message wording a little so the output is less confusing to the user.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-09 15:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-02 13:47 [PATCH 0/1] check whether multiple versions of the same PN are due Robert Yang
2013-09-02 13:47 ` [PATCH 1/1] runqueue.py: check whether multiple versions of the same PN are due to be built Robert Yang
2013-09-09 15:29   ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.