Bug 4814 - rpm is broken on 1.5 M2 RC1 lsb images
Summary: rpm is broken on 1.5 M2 RC1 lsb images
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.5 M3
Assignee: Chen Qi
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-07-04 11:50 UTC by Stoicescu Cornel
Modified: 2013-10-01 14:27 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stoicescu Cornel 2013-07-04 11:50:55 UTC
master:eaa5df34af42b6a37f6506847d0f3ef6ba0d298a

1) boot qemux86-64 core-image-lsb-sdk image
2) issue commands:
"
root@qemux86-64:~# rpm -e mc
error: package mc is not installed
root@qemux86-64:~# which mc
/usr/bin/mc
root@qemux86-64:~# rpm -qa
root@qemux86-64:~#
"

Notice: - mc is not detected as installed even though it is on the image and works
- 'rpm -qa' has no output

NOTE: Tested for BSP and QEMU targets on core-image-lsb-sdk images (ex: qemux86-64, jasperforest, sugarbay)
Comment 1 Alexandru Georgescu 2013-07-09 07:54:46 UTC
I think this should be assigned to another person since Bogdan is no longer working on the Yocto project.
Comment 2 Mark Hatle 2013-07-11 02:52:19 UTC
I attempted to reproduce this issue with core-image-basic.  The package manager and related files were there as expected in my configuration.

Looking at the code, if the system is configured without 'package-management' enabled in IMAGES_FEATURES, then the RPM database and related smart database will be erased.
Comment 3 Chen Qi 2013-07-11 11:53:11 UTC
Previously, only core-image-minimal will remove he packaging data files.

Now the logic has changed, if package-management is not in 'IMAGE_FEATURES', the packaging data files will be deleted.

commit 1ce182e79e6c588de4ca372587c0797bc0cb7e80
Author: Laurentiu Palcu <laurentiu.palcu@intel.com>
Date:   Tue May 21 14:27:49 2013 +0300

    image.bbclass: remove unneeded files from the image
    
    This patch creates a new function, rootfs_remove_unneeded(), that will
    be called after rootfs_*_do_rootfs is called and which will handle
    delayed postinstalls in a generic fashion, for all backends in the same
    way.


Adding 'package-management' to core-image-lsb will do the fix.

LSB does require a package manager available.

//Chen Qi
Comment 4 Chen Qi 2013-07-17 04:57:17 UTC
merged into poky/master: a8cd0fcf05e8eaf2af3d2346b5b46ac9f2d8dadc

http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=c66228663177896458488eb058af4cd17a272424
Comment 5 Stoicescu Cornel 2013-10-01 14:27:04 UTC
This issue is not present in latest 1.5 M5 RC5 build. Setting to VERIFIED for:
poky master:4d8ab87d25ea6e59dc88375813ef88ee0ac813d0