Skip to contentSkip to conversation

package_rpm.bbclass: Remove empty build directory

PATCH New [email protected] 1 participant 2 messages Jun 24, 2025

lore
Share & tools
lore
#0 lore raw

cover package_rpm.bbclass: Remove empty build directory

From: Robert Yang <[email protected]>

The following changes since commit fd79c20430ad5c540522ddbe72ef235379c628bd:

tune-cortexr52: Remove aarch64 for ARM Cortex-R52 (2025-06-16 12:50:00 -0700)

are available in the Git repository at:

https://github.com/robertlinux/yocto rbt/walnascar-rpm
https://github.com/robertlinux/yocto/tree/rbt/walnascar-rpm

Robert Yang (1):
package_rpm.bbclass: Remove empty build directory

 meta/classes-global/package_rpm.bbclass | 1 +
 1 file changed, 1 insertion(+)
Signature · 1 line
2.49.0
#1 lore raw

PATCH 1/1 package_rpm.bbclass: Remove empty build directory

From: Robert Yang <[email protected]>

Fixed:

$ bitbake acl
$ ls tmp/work/core2-64-poky-linux/acl/2.3.2/build/acl-2.3.2-build/

This empty directory is created by rpmbuild, just remove it like others above.

Note, master branch doesn't have this problem after upgrade to rpm 4.20.1, but it's not easy to find which patch(es) fixed the problem, and the issues haven't been fixed completely, there is still an empty SRPMS directory, so just remove the build directory as others above.

If we don't fix this, there might be warnings when a recipe uses:

install -m 0644 ${B}/* ${DEPLOYDIR}/boot.bin-extracted/

install: omitting directory '${B}/xilinx-bootbin-1.0-build'

---
 meta/classes-global/package_rpm.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes-global/package_rpm.bbclass +1 -0
index f383ed140e..c6541d141b 100644
@@ -728,6 +728,7 @@ python do_package_rpm () {
 
     # rpm 4 creates various empty directories in _topdir, let's clean them up
     cleanupcmd = "rm -rf %s/BUILDROOT %s/SOURCES %s/SPECS %s/SRPMS" % (workdir, workdir, workdir, workdir)
+    cleanupcmd += " %s/%s-build" % (d.getVar('B'), d.getVar('P'))
 
     # Build the rpm package!
     d.setVar('BUILDSPEC', cmd + "\n" + cleanupcmd + "\n")
Signature · 1 line
2.49.0