public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH V5] rootfs.py: allow removal of unneeded packages
@ 2016-08-17 23:25 Stephano Cetola
  2016-08-17 23:25 ` Stephano Cetola
  0 siblings, 1 reply; 2+ messages in thread
From: Stephano Cetola @ 2016-08-17 23:25 UTC (permalink / raw)
  To: openembedded-core

Paul and I had a discussion about this a couple weeks ago. We want to
allow for the removal of certain packages, regardless of the image
features containing "read-only-rootfs".

For example, if something has a runtime dependency on update-rc.d or
shadow, we need a way to remove these packages regardless of this
dependency.

Here is my idea for documenting the new variable:

FORCE_RO_REMOVE
Setting this variable to "1" will force the removal of the packages
listed in ROOTFS_RO_UNNEEDED during the generation of the rootfs.

I have purposely kept ROOTFS_RO_UNNEEDED from being easily
overridden, as this would have allowed users to remove packages on a
whim, which may be giving them just enough rope to hang themselves.

That being said, IMHO this patch adds some flexibility without adding
serious complexity or avenues for confusion.

Stephano Cetola (1):
  rootfs.py: allow removal of unneeded packages

 meta/lib/oe/rootfs.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.9.3



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH V5] rootfs.py: allow removal of unneeded packages
  2016-08-17 23:25 [PATCH V5] rootfs.py: allow removal of unneeded packages Stephano Cetola
@ 2016-08-17 23:25 ` Stephano Cetola
  0 siblings, 0 replies; 2+ messages in thread
From: Stephano Cetola @ 2016-08-17 23:25 UTC (permalink / raw)
  To: openembedded-core

Current functionality allows for the removal of certain packages
based on the read-only image feature. This patch extends this
functionality by adding the FORCE_RO_REMOVE variable, which will
remove these packages regardless of any image features.

[ YOCTO #9491 ]

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
---
 meta/lib/oe/rootfs.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index ed0bab1..7c620e9 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -253,7 +253,9 @@ class Rootfs(object, metaclass=ABCMeta):
 
         image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
                                         True, False, self.d)
-        if image_rorfs:
+        image_rorfs_force = self.d.getVar('FORCE_RO_REMOVE', True)
+
+        if image_rorfs or image_rorfs_force == "1":
             # Remove components that we don't need if it's a read-only rootfs
             unneeded_pkgs = self.d.getVar("ROOTFS_RO_UNNEEDED", True).split()
             pkgs_installed = image_list_installed_packages(self.d)
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-17 23:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-17 23:25 [PATCH V5] rootfs.py: allow removal of unneeded packages Stephano Cetola
2016-08-17 23:25 ` Stephano Cetola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox