From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] package_rpm: Remove need for locking
Date: Tue, 05 Nov 2013 22:08:04 +0000 [thread overview]
Message-ID: <1383689284.6271.179.camel@ted> (raw)
Currently if multiple package tasks are running against a recipe, package_rpm
is restricted to the slowest speed of them due to the locking. This patch
explicitly ignores the opkg/debian artefacts and hence allows a speedup.
It also removes an issue were a Ctrl+C interrupting a deb.ipk packaging task
would end up with CONTROL/DEBIAN files in the spec file resulting in a build
failure.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 36bad09..31265d9 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -660,9 +660,16 @@ python write_specfile () {
array.append("%s: %s" % (tag, dep))
def walk_files(walkpath, target, conffiles):
+ # We can race against the ipk/deb backends which create CONTROL or DEBIAN directories
+ # when packaging. We just ignore these files which are created in
+ # packages-split/ and not package/
for rootpath, dirs, files in os.walk(walkpath):
path = rootpath.replace(walkpath, "")
+ if path.endswith("DEBIAN") or path.endswith("CONTROL"):
+ continue
for dir in dirs:
+ if dir == "CONTROL" or dir == "DEBIAN":
+ continue
# All packages own the directories their files are in...
target.append('%dir "' + path + '/' + dir + '"')
for file in files:
@@ -760,8 +767,6 @@ python write_specfile () {
root = "%s/%s" % (pkgdest, pkg)
- lf = bb.utils.lockfile(root + ".lock")
-
localdata.setVar('ROOT', '')
localdata.setVar('ROOT_%s' % pkg, root)
pkgname = localdata.getVar('PKG_%s' % pkg, True)
@@ -842,8 +847,6 @@ python write_specfile () {
else:
bb.note("Creating EMPTY RPM Package for %s" % splitname)
spec_files_top.append('')
-
- bb.utils.unlockfile(lf)
continue
# Process subpackage data
@@ -949,7 +952,6 @@ python write_specfile () {
spec_files_bottom.append('')
del localdata
- bb.utils.unlockfile(lf)
add_prep(d,spec_files_bottom)
spec_preamble_top.append('Summary: %s' % srcsummary)
reply other threads:[~2013-11-05 22:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1383689284.6271.179.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox