All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] package_manager: call createrepo with --dbpath pointing inside WORKDIR
Date: Tue, 31 Mar 2015 11:09:46 -0500	[thread overview]
Message-ID: <551AC6CA.7030500@windriver.com> (raw)
In-Reply-To: <1427761001-25332-1-git-send-email-ed.bartosh@linux.intel.com>

On 3/30/15 7:16 PM, Ed Bartosh wrote:
> Rpm database in staging area is used only by createrepo.
> createrepo fails with the error
> "rpmdb: BDB0060 PANIC: fatal region error detected"
> if rpm database is broken during previous run of createrepo.
> 
> Made createrepo to create rpm db in $WORKDIR/rpmdb/ from scratch
> for every build. This should potentially fix the failure.
> 
> [YOCTO #6571]
> 
> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
> ---
>  meta/lib/oe/package_manager.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
> index 743c7cb..2461acd 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -110,12 +110,16 @@ class RpmIndexer(Indexer):
>          rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo")
>          index_cmds = []
>          rpm_dirs_found = False
> +        dbpath = os.path.join(self.d.getVar('WORKDIR', True), 'rpmdb')
> +        if os.path.exists(dbpath):
> +            bb.utils.remove(dbpath, True)
>          for arch in archs:
>              arch_dir = os.path.join(self.deploy_dir, arch)
>              if not os.path.isdir(arch_dir):
>                  continue
>  
> -            index_cmds.append("%s --update -q %s" % (rpm_createrepo, arch_dir))
> +            index_cmds.append("%s --dbpath %s --update -q %s" % \
> +                             (rpm_createrepo, dbpath, arch_dir))

I'd suggest that the dbpath be made arch specific.... this would eliminate any
serialization that may occur with even simple DB locks.

--dbpath %s/%s ....

--Mark

>  
>              rpm_dirs_found = True
>  
> 



  parent reply	other threads:[~2015-03-31 16:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30  8:30 [PATCH] rootfs.py: Remove rpm database from staging area Ed Bartosh
2015-03-30  8:53 ` Richard Purdie
2015-03-30 14:56   ` Mark Hatle
2015-03-30 15:14   ` Mark Hatle
2015-03-30 19:00     ` Ed Bartosh
2015-03-30 19:22       ` Mark Hatle
2015-03-30 22:47     ` Ed Bartosh
2015-03-30 23:49       ` [PATCH] createrepo: Implement --dbpath command line option Ed Bartosh
2015-03-31  0:16         ` [PATCH] package_manager: call createrepo with --dbpath pointing inside WORKDIR Ed Bartosh
2015-03-31 12:06           ` Richard Purdie
2015-03-31 16:09           ` Mark Hatle [this message]
2015-04-01 11:17             ` Ed Bartosh
2015-03-31 21:25         ` [PATCH] createrepo: Implement --dbpath command line option Burton, Ross
2015-04-01 11:19           ` Ed Bartosh
2015-04-01 12:06           ` Ed Bartosh
2015-04-01 12:12             ` Ed Bartosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=551AC6CA.7030500@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.