[oe-commits] Richard Purdie : package_rpm: Fix a race with package_deb/package_ipk
git at git.openembedded.org
git at git.openembedded.org
Thu Jan 16 12:07:45 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: e38d7702be279d6d6d4c79b3f2379e689a7473d2
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=e38d7702be279d6d6d4c79b3f2379e689a7473d2
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date: Wed Jan 15 17:47:45 2014 +0000
package_rpm: Fix a race with package_deb/package_ipk
We have the odd situation where the CONTROL/DEBIAN directory can be removed
in the middle of the walk, the isdir() test would then fail and the walk code
would assume its a file hence we check for the names in files too.
This resolves the autobuilder failure:
error: File not found: /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-fsl-arm/build/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/xinit/1_1.3.3-r0/package/DEBIAN
RPM build errors:
File not found: /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-fsl-arm/build/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/xinit/1_1.3.3-r0/package/DEBIAN
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/package_rpm.bbclass | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index fcde73e..acbb18d 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -659,6 +659,9 @@ python write_specfile () {
# 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/
+ # We have the odd situation where the CONTROL/DEBIAN directory can be removed in the middle of
+ # of the walk, the isdir() test would then fail and the walk code would assume its a file
+ # hence we check for the names in files too.
for rootpath, dirs, files in os.walk(walkpath):
path = rootpath.replace(walkpath, "")
if path.endswith("DEBIAN") or path.endswith("CONTROL"):
@@ -669,6 +672,8 @@ python write_specfile () {
# All packages own the directories their files are in...
target.append('%dir "' + path + '/' + dir + '"')
for file in files:
+ if file == "CONTROL" or file == "DEBIAN":
+ continue
if conffiles.count(path + '/' + file):
target.append('%config "' + path + '/' + file + '"')
else:
More information about the Openembedded-commits
mailing list