| Summary: | QA issue: check whether PACKAGES matches the really generated packages | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Robert Yang <liezhi.yang> |
| Component: | core | Assignee: | Hongxu Jia <hongxu.jia> |
| Status: | VERIFIED DUPLICATE | QA Contact: | Cristina Agurida <cristina-danielax.agurida> |
| Severity: | enhancement | ||
| Priority: | Medium | CC: | bluelightning, cristina-danielax.agurida, hongxu.jia, mark.hatle, meta.mr.watcher, meta.watcher, richard.purdie, sgw |
| Version: | 1.6 | ||
| Target Milestone: | 1.9 M3 | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| See Also: | https://bugzilla.yoctoproject.org/show_bug.cgi?id=5529 | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Yes (doc changes required) | |
|
Description
Robert Yang
2013-11-14 08:51:28 UTC
So not generating empty packages is a deliberate feature of the system and I'm not sure if we need a global check for that. However, what I think would be useful is a check to ensure that if there is a dependency (RDEPENDS) on a package and that package is empty and not produced, we error out as soon as possible (probably at the end of do_package of the recipe that should have produced the package). This is something I've been thinking about for a while and some of the changes that Richard has been working on to make dependency information accessible to the metadata may help with this. (In reply to comment #1) > So not generating empty packages is a deliberate feature of the system and > I'm not sure if we need a global check for that. > Hi Paul, Yes, not generating empty packages by default is a good feature, but we'd better not leave the nonexistence packages in the PACKAGES, this would cause confusion to the user, such a QA check will help us to cleanup the PACKAGES, and it would be helpful for debug (for example "bitbake -e recipe | grep '^PACKAGES=' " will show the packages that we will really get except the PACKAGES_DYNAMIC), and also helpful when the user add a pkg to PACKAGES, but it isn't generated. > However, what I think would be useful is a check to ensure that if there is > a dependency (RDEPENDS) on a package and that package is empty and not > produced, we error out as soon as possible (probably at the end of > do_package of the recipe that should have produced the package). This is > something I've been thinking about for a while and some of the changes that > Richard has been working on to make dependency information accessible to the > metadata may help with this. Sounds greate. Just so that it's independent, I've now entered bug 6420 to specifically track detecting missing RDEPENDS. Test Steps:
1. Edit xz and gzip recipe, to simulate a package missing situation (the manually added
rdepends is not real but):
..............
diff --git a/meta/recipes-extended/gzip/gzip.inc b/meta/recipes-extended/gzip/gzip.inc
index 671b1eb..7e643e5 100644
--- a/meta/recipes-extended/gzip/gzip.inc
+++ b/meta/recipes-extended/gzip/gzip.inc
@@ -32,3 +32,8 @@ ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
export CONFIG_SHELL="/bin/sh"
+
+PACKAGES =+ "${PN}-missing1 ${PN}-missing2"
+FILES_${PN}-missing1 = ""
+FILES_${PN}-missing2 = ""
+RPROVIDES_${PN}-missing1 = "${PN}-missing"
diff --git a/meta/recipes-extended/xz/xz_5.1.3alpha.bb b/meta/recipes-extended/xz/xz_5.1.3alpha.bb
index 168e383..c5d8b57 100644
--- a/meta/recipes-extended/xz/xz_5.1.3alpha.bb
+++ b/meta/recipes-extended/xz/xz_5.1.3alpha.bb
@@ -37,6 +37,9 @@ FILES_liblzma-dev = "${includedir}/lzma* ${libdir}/liblzma*${SOLIBSDEV} ${libdir
FILES_liblzma-staticdev = "${libdir}/liblzma.a"
FILES_liblzma-dbg = "${libdir}/.debug/liblzma*"
+
+RDEPENDS_${PN}_class-target += "gzip-missing gzip-missing2"
+
BBCLASSEXTEND = "native nativesdk"
export CONFIG_SHELL="/bin/sh"
..............
2. Vim local.conf
...
IMAGE_INSTALL_append = " xz"
WARN_QA_append = " package-missing"
...
3. bitbake core-image-minimal
..............
|WARNING: QA Issue: package gzip-missing1 not generated, but listed in PACKAGES
|Compute rdepends chains, '-->' means 'runtime depends'
|("gzip-missing1" rprovides "gzip-missing")
|"xz" -> "gzip-missing"
| [package-missing]
|WARNING: QA Issue: package gzip-missing2 not generated, but listed in PACKAGES
|Compute rdepends chains, '-->' means 'runtime depends'
|"xz" -> "gzip-missing2"
| [package-missing]
|ERROR: Unable to install packages. Command '/home/jiahongxu/yocto/build-2014120
2-mips/tmp/sysroots/x86_64-linux/usr/bin/smart --quiet --data-dir=/home/jiahongx
u/yocto/build-20141202-mips/tmp/work/qemumips-poky-linux/core-image-minimal/1.0
-r0/rootfs/var/lib/smart install -y xz@mips32r2 run-postinsts@all packagegroup-
core-boot@qemumips' returned 1:
error: Can't install xz-5.1.3alpha-r0@mips32r2: no package provides gzip-missing
|ERROR: Function failed: do_rootfs
|ERROR: Logfile of failure stored in: /home/jiahongxu/yocto/build-20141202-mips/
tmp/work/qemumips-poky-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs.24338
|ERROR: Task 7 (/home/jiahongxu/yocto/poky/meta/recipes-core/images/core-image-
minimal.bb, do_rootfs) failed with exit code '1'
..............
//Hongxu
This is rejected by RP: ... This tells me what the change does. What it doesn't say is why we need this? Its a fairly invasive set of changes but I don't see the usecase... Cheers, Richard ... *** This bug has been marked as a duplicate of bug 6420 *** I'm marking this issue as verified duplicated. |