Bug 1706

Summary: disabling package management is not described
Product: [Documentation] Quick Start Reporter: Frans Meulenbroeks <fransmeulenbroeks>
Component: quick-startAssignee: Scott Rifenbark <srifenbark>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: dvhart, jessica.zhang, poky.doc.watcher, poky.watcher, richard.purdie, sgw
Version: unspecified   
Target Milestone: 1.5   
Hardware: x86   
OS: Multiple   
URL: http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/commit/?id=51eb79b88794beaefcb88a4408714a88c9126b2b
Whiteboard: 8 May 2013
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Frans Meulenbroeks 2011-11-01 01:33:19 UTC
apparently package-management is an image feature that can be used to disable package management but this IMAGE_FEATURE is nowhere described in 1.1 of the reference manual.

Or more generic:
it would be nice if it was described how to create stand alone images not requiring any package management within the image. 
To me this seems not an uncommon situation in the embedded world
Comment 1 Scott Rifenbark 2011-12-14 16:28:12 UTC
Here is some additional information for this bug from an IRC chat from Richard.  I will use this information next visit on this bug.  Saving it here for now. 

(02:10:03 PM) RP: scottrif: The core-image-minimal does this iirc and you can see the 'magic' line if you look at its .bb file
(02:10:31 PM) RP: scottrif: (which is exactly how I'd look it up)
(02:13:16 PM) scottrif: RP:  that would be core-image-minimal.bb in poky/meta/recipes-core/images correct?  Magic line is ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; "
(02:13:25 PM) RP: scottrif: yes 
(02:17:42 PM) scottrif: RP:  I am looking at http://bugzilla.pokylinux.org/show_bug.cgi?id=1706 and trying to determine if what I am seeing in core-image-minimal.bb is the generic way to create a stand-alone image not requiring any package management.  Is this statement in core-image-minimal.bb the same one that could be used for any stand-alone image?
(02:55:59 PM) RP: scottrif: yes, add that to any image or configureation and it will remove packaging
Comment 2 Frans Meulenbroeks 2011-12-14 23:56:39 UTC
I am not sure if the solution from Richard is sufficient.
For lean images one would also make sure that the package manager itself and whatever it needs is removed.
E.g. for opkg I feel /usr/bin/opkg and /usr/lib/*opkg* should be removed, not sure if that is the case right now (and cannot test it at the moment).

(or, in other words, if opkg was used intermediately,
find / | grep opkg 
probably should result in no files found)
Comment 3 Scott Rifenbark 2012-04-24 22:55:52 UTC
Reassigned the category to other.  Needs to be assigned to the "Development Manual" when that category is set up.
Comment 4 Scott Rifenbark 2013-02-15 20:46:50 UTC
Richard, 

Here is a vintage bug....  Do you have any comments on Frans' last issue?  Because I can take the information from our IRC chat in my comment and talk about creating a stand-alone image that has packaging removed.

Thanks, 
Scott
Comment 5 Richard Purdie 2013-05-01 15:56:28 UTC
If you remove package-management from IMAGE_FEATURES, it will remove the package manager dependencies as well as removing the package manager from the rootfs.

For example core-image-sato has "package-management" in IMAGE_FEATURES, core-image-minimal does not and hence a package-manager is not present.

If you combine this with the ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ;" item, this addresses Frans' concern.
Comment 6 Scott Rifenbark 2013-05-07 14:45:25 UTC
I created a small section that is part of the bigger section that discusses ways to reduce the image and rootfs to get very small systems.  The section is at http://www.yoctoproject.org/docs/1.5/dev-manual/dev-manual.html#remove-package-management-requirements.

The section needs reviewed.  I added Darren to the CC list so he could have input as it affects the section he help create.

Scott
Comment 7 Scott Rifenbark 2013-05-07 15:15:44 UTC
Applied review comments from Richard Purdie and also added the new technique to reduce the image into the parent section's introductory paragraphs.

Newest version is http://www.yoctoproject.org/docs/1.5/dev-manual/dev-manual.html#remove-package-management-requirements.

Scott
Comment 8 Richard Purdie 2013-05-08 08:49:09 UTC
"One way to reduce the size of the kernel" -> "One way to reduce the size of the image"

"to remove packaging files: " -> "to remove package management data files: 

"its dependencies" -> "its unique dependencies"
Comment 9 Scott Rifenbark 2013-05-08 10:44:26 UTC
I applied the three edits suggested by Richard in the previous comment.  The new version is published to http://www.yoctoproject.org/docs/1.5/dev-manual/dev-manual.html#remove-package-management-requirements.

Scott
Comment 10 Richard Purdie 2013-05-08 11:07:46 UTC
With Scott's changes I think we can resolve this now...