diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-05 13:33:37 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-25 22:27:46 +0000 |
commit | d3dcc4f92e0fdf1e044bbd71741b77581f64ce6d (patch) | |
tree | 88482219b51004969c39ce37d534b43886258b69 /meta/classes | |
parent | 31a84b4316b96a57c844eb196244c2e522691c4e (diff) | |
download | poky-d3dcc4f92e0fdf1e044bbd71741b77581f64ce6d.tar.gz |
package_rpm/archiver: Apply bandaid to src.rpm creation
| error: create archive failed on file /media/build1/poky/build/tmp/work/all-poky-linux/xcursor-transparent-theme/0.1.1+gitAUTOINC+23c8af5ba4-r0/deploy-sources/allarch-poky-linux/xcursor-transparent-theme-0.1.1+gitAUTOINC+23c8af5ba4-r0/xcursor-transparent-theme-0.1.1+git0+23c8af5ba4-r0.src.rpm: cpio: read failed - No such file or directory
| Building target platforms: noarch-poky-linux
| Building for target noarch-poky-linux
This is caused by:
$ cat log.task_order
do_cleansstate (24289): log.do_cleansstate.24289
do_deploy_archives_setscene (24395): log.do_deploy_archives_setscene.24395
do_fetch (24407): log.do_fetch.24407
[..]
do_package_write_rpm (25448): log.do_package_write_rpm.25448
do_package_qa (25451): log.do_package_qa.25451
So do_deploy_archives can run from sstate, created a .src.rpm in WORKDIR/deploy-sources,
then it was removed when rpm was running. This leads to a broken Source line in the
spec file as the original file was found by the os.listdir().
This fix is just a bandaid over much more fundamental problems sadly.
(From OE-Core rev: a10020ace4c3cd863c782760f7cbecea557ec6e7)
(From OE-Core rev: 6d56e912fbbaa22830b4da5ab230586a3d15b23e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 7d75f460c7..1a64cb271a 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -113,6 +113,10 @@ python write_specfile () { | |||
113 | source_list = os.listdir(ar_outdir) | 113 | source_list = os.listdir(ar_outdir) |
114 | source_number = 0 | 114 | source_number = 0 |
115 | for source in source_list: | 115 | for source in source_list: |
116 | # do_deploy_archives may have already run (from sstate) meaning a .src.rpm may already | ||
117 | # exist in ARCHIVER_OUTDIR so skip if present. | ||
118 | if source.endswith(".src.rpm"): | ||
119 | continue | ||
116 | # The rpmbuild doesn't need the root permission, but it needs | 120 | # The rpmbuild doesn't need the root permission, but it needs |
117 | # to know the file's user and group name, the only user and | 121 | # to know the file's user and group name, the only user and |
118 | # group in fakeroot is "root" when working in fakeroot. | 122 | # group in fakeroot is "root" when working in fakeroot. |