diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-05 22:08:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-06 11:02:26 +0000 |
commit | 1eefcf0ba8c5c74312c78fbcf5f27c3840a6578a (patch) | |
tree | 50e4c4b5fda6dc1efc84c333c6138bf568b811a9 /meta/classes/package_rpm.bbclass | |
parent | d5a1538f0fb5112a9549a243b074bca681d9139b (diff) | |
download | poky-1eefcf0ba8c5c74312c78fbcf5f27c3840a6578a.tar.gz |
package_rpm: Remove need for locking
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.
(From OE-Core rev: 4c3b3a57aa9ced231f5c0340920195c15a26f2b1)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 36bad09ea1..31265d960a 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -660,9 +660,16 @@ python write_specfile () { | |||
660 | array.append("%s: %s" % (tag, dep)) | 660 | array.append("%s: %s" % (tag, dep)) |
661 | 661 | ||
662 | def walk_files(walkpath, target, conffiles): | 662 | def walk_files(walkpath, target, conffiles): |
663 | # We can race against the ipk/deb backends which create CONTROL or DEBIAN directories | ||
664 | # when packaging. We just ignore these files which are created in | ||
665 | # packages-split/ and not package/ | ||
663 | for rootpath, dirs, files in os.walk(walkpath): | 666 | for rootpath, dirs, files in os.walk(walkpath): |
664 | path = rootpath.replace(walkpath, "") | 667 | path = rootpath.replace(walkpath, "") |
668 | if path.endswith("DEBIAN") or path.endswith("CONTROL"): | ||
669 | continue | ||
665 | for dir in dirs: | 670 | for dir in dirs: |
671 | if dir == "CONTROL" or dir == "DEBIAN": | ||
672 | continue | ||
666 | # All packages own the directories their files are in... | 673 | # All packages own the directories their files are in... |
667 | target.append('%dir "' + path + '/' + dir + '"') | 674 | target.append('%dir "' + path + '/' + dir + '"') |
668 | for file in files: | 675 | for file in files: |
@@ -760,8 +767,6 @@ python write_specfile () { | |||
760 | 767 | ||
761 | root = "%s/%s" % (pkgdest, pkg) | 768 | root = "%s/%s" % (pkgdest, pkg) |
762 | 769 | ||
763 | lf = bb.utils.lockfile(root + ".lock") | ||
764 | |||
765 | localdata.setVar('ROOT', '') | 770 | localdata.setVar('ROOT', '') |
766 | localdata.setVar('ROOT_%s' % pkg, root) | 771 | localdata.setVar('ROOT_%s' % pkg, root) |
767 | pkgname = localdata.getVar('PKG_%s' % pkg, True) | 772 | pkgname = localdata.getVar('PKG_%s' % pkg, True) |
@@ -842,8 +847,6 @@ python write_specfile () { | |||
842 | else: | 847 | else: |
843 | bb.note("Creating EMPTY RPM Package for %s" % splitname) | 848 | bb.note("Creating EMPTY RPM Package for %s" % splitname) |
844 | spec_files_top.append('') | 849 | spec_files_top.append('') |
845 | |||
846 | bb.utils.unlockfile(lf) | ||
847 | continue | 850 | continue |
848 | 851 | ||
849 | # Process subpackage data | 852 | # Process subpackage data |
@@ -949,7 +952,6 @@ python write_specfile () { | |||
949 | spec_files_bottom.append('') | 952 | spec_files_bottom.append('') |
950 | 953 | ||
951 | del localdata | 954 | del localdata |
952 | bb.utils.unlockfile(lf) | ||
953 | 955 | ||
954 | add_prep(d,spec_files_bottom) | 956 | add_prep(d,spec_files_bottom) |
955 | spec_preamble_top.append('Summary: %s' % srcsummary) | 957 | spec_preamble_top.append('Summary: %s' % srcsummary) |