Bug 10711

Summary: QA issue "do not use [expanded-d] ${D} on postinst" is not thrown when using RPM as package manager
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jose Perez C <jose.perez.carranza>
Component: coreAssignee: Ross Burton <ross.burton>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: meta.mr.watcher, meta.watcher
Version: 2.3   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Test Recepie none

Description Jose Perez C 2016-11-23 13:56:26 UTC
Created attachment 3545 [details]
Test Recepie

Steps:

1.-  set following on loca.conf
      MACHINE ??= "qemux86"
      PACKAGE_CLASSES ?= "package_rpm"
      IMAGE_INSTALL_append += "z"

2.- Download attached recipe and use it on poky/meta-selftest/recipes-test

3.- bitbake core-image-minimal 


Expected:
ERROR: z-1.0-r0 do_package_qa: QA Issue: pkg_postinst in z recipe contains ${D}, it should be replaced by $D instead [expanded-d]
ERROR: z-1.0-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: z-1.0-r0 do_package_qa: Function failed: do_package_qa


Actual:
Image is built correctly.

Note: 
Errors are thrown if PACKAGE_CLASSES ?= "package_ipk package_deb"
Comment 1 Ross Burton 2016-11-24 23:46:11 UTC
The test was broken, and how the test was executed was broken.

Whilst I could sort of replicate the behaviour I think it was due to how the test framework was implemented - basically this test shouldn't be running for this recipe because it was implemented as a per-file test and this package doesn't have any files...

Patches on the list to rewrite a few bits of insane and fix the test.
Comment 2 Ross Burton 2016-11-30 17:11:11 UTC
Fixed in oe-core afda72b2424528eaff9054327530bdf5654bec66.
Comment 3 Jose Perez C 2017-04-11 21:07:45 UTC
Just tested in master Verified on commit b283b10d5363b4d86f2a18fce6a6aa37325fb5f2 is working correctly.