Bug 608

Summary: [rpm/zypper] remove_packaging_data_files makes rpm/zypper install/remove not work in minimal image
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jiajun Xu <jiajun.xu>
Component: coreAssignee: Qing He <qing.he>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: ke.yu, kevin.tian, kunwei.tian, meta.mr.watcher, meta.watcher, richard.purdie, sgw, yi.zhao
Version: unspecified   
Target Milestone: 1.0 M4   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Jiajun Xu 2010-12-21 19:08:13 UTC
Testing Env:    
Hardware: all
poky-image-minimal image from milestone build (20101218) on autobuilder,
http://autobuilder.pokylinux.org/milestone/20101218-1/.
poky commit info: 8254b071ca6d14b90ce35354f640dd502a39ce48 from poky contrib tree

When a minimal image is generated, function remove_packaging_data_files is called to remove rpm package information directory, like /var/lib/rpm. This causes rpm/zypper install/remove not work in minimal image.

Reproduce Steps:
1. Download or build a minimal image
2. Boot up the image and run command "zypper remove bash"
Comment 1 Richard Purdie 2010-12-22 12:41:01 UTC
If packaging files are removed, its expected that zypper and rpm won't work. The question is therefore should the packaging files be removed on a minimal image? So we have a definition anywhere which states this one way or another?
Comment 2 Qing He 2010-12-28 23:24:04 UTC
Should rpm and zypper be installed on the minimal image?

And maybe we can add a check on the rootfs stage to increase sanity

/var/lib/rpm/* is only removed iff some variable (say, ROOTFS-PRUNE-PKG-INFO = "1") is set and rpm/zypper is not installed
Comment 3 Richard Purdie 2010-12-30 01:35:38 UTC
Since the package data files are removed by the explicit call to remove_packaging_data_files, rpm and zypper should not be installed in the minimal image as that makes no sense.

Being able to set an option to remove the packaging files which only worked if rpm/zypper were not installed would not be intuitive to the user. Having a check in remove_packaging_data_files that ensures rpm/zypper/dpkg/apt/opkg are not installed would be nice though.
Comment 4 Qing He 2011-03-08 00:13:02 UTC
fixed by RP in commit 36f8aa6dc8971119ad35e7d581092fd05a2d45a3
Comment 5 Jiajun Xu 2011-03-08 00:31:59 UTC
(In reply to comment #4)
> fixed by RP in commit 36f8aa6dc8971119ad35e7d581092fd05a2d45a3

Verify the bug since with M4 RC1 build, there is no rpm/zypper command in minimal image now.