Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] rootfs.py: Change logic to unistall packages
@ 2015-11-26  9:34 mariano.lopez
  2015-11-26  9:34 ` [PATCH 1/1] " mariano.lopez
  0 siblings, 1 reply; 2+ messages in thread
From: mariano.lopez @ 2015-11-26  9:34 UTC (permalink / raw)
  To: openembedded-core

From: Mariano Lopez <mariano.lopez@linux.intel.com>

This patch changes the logic to unistall some base utils when creating
rootfs. It chages from checking for a package manger to check if it is
a read-only rootfs.

[YOCTO #8235]

The following changes since commit 03f15e51998a3ef65a5b68cb7cbf724f4388c289:

  sstate: Ensure siginfo and sig files are also touched (2015-11-25 08:09:00 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib mariano/bug8235
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mariano/bug8235

Mariano Lopez (1):
  rootfs.py: Change logic to unistall packages

 meta/lib/oe/rootfs.py | 41 +++++++++++++++++++++--------------------
 1 file changed, 21 insertions(+), 20 deletions(-)

-- 
1.8.4.5



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

* [PATCH 1/1] rootfs.py: Change logic to unistall packages
  2015-11-26  9:34 [PATCH 0/1] rootfs.py: Change logic to unistall packages mariano.lopez
@ 2015-11-26  9:34 ` mariano.lopez
  0 siblings, 0 replies; 2+ messages in thread
From: mariano.lopez @ 2015-11-26  9:34 UTC (permalink / raw)
  To: openembedded-core

From: Mariano Lopez <mariano.lopez@linux.intel.com>

In the current state some of the base utils (update-rc.d,
base-passwd, shadow, and update-alternatives) are unistalled
when there is no package manager in the image. Checking for
previous commits, the unistall of these utils were to be
done in a read-only filesystem.

It is a valid option to have these utils without a package
manager, and also make sense to remove them when building a
read-only filesystem.

This changes the check logic from having a package mananger
to if is a read-only filesystem to remove the utils.

Another change implemented with this patch is that delayed
post installs now doesn't depend if there is a package manager.
Also it is a valid option to have post install scripts without
package manger.

[YOCTO #8235]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
---
 meta/lib/oe/rootfs.py | 41 +++++++++++++++++++++--------------------
 1 file changed, 21 insertions(+), 20 deletions(-)

diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index c004a5b..a2af332 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -239,26 +239,27 @@ class Rootfs(object):
             pkg_to_remove = ""
         else:
             pkg_to_remove = "update-rc.d"
-        if not runtime_pkgmanage:
-            # Remove components that we don't need if we're not going to install
-            # additional packages at runtime
-            if delayed_postinsts is None:
-                pkgs_installed = image_list_installed_packages(self.d)
-                pkgs_to_remove = list()
-                for pkg in pkgs_installed.split():
-                    if pkg in ["update-rc.d",
-                            "base-passwd",
-                            "shadow",
-                            "update-alternatives", pkg_to_remove,
-                            self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True)
-                            ]:
-                        pkgs_to_remove.append(pkg)
-
-                if len(pkgs_to_remove) > 0:
-                    self.pm.remove(pkgs_to_remove, False)
-
-            else:
-                self._save_postinsts()
+        if image_rorfs:
+            # Remove components that we don't need if it's a read-only rootfs
+            pkgs_installed = image_list_installed_packages(self.d)
+            pkgs_to_remove = list()
+            for pkg in pkgs_installed.split():
+                if pkg in ["update-rc.d",
+                        "base-passwd",
+                        "shadow",
+                        "update-alternatives", pkg_to_remove,
+                        self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True)
+                        ]:
+                    pkgs_to_remove.append(pkg)
+
+            if len(pkgs_to_remove) > 0:
+                self.pm.remove(pkgs_to_remove, False)
+
+        if delayed_postinsts:
+            self._save_postinsts()
+            if image_rorfs:
+                bb.warn("There are post install scripts "
+                        "in a read-only rootfs")
 
         post_uninstall_cmds = self.d.getVar("ROOTFS_POSTUNINSTALL_COMMAND", True)
         execute_pre_post_process(self.d, post_uninstall_cmds)
-- 
1.8.4.5



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

end of thread, other threads:[~2015-11-26 17:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-26  9:34 [PATCH 0/1] rootfs.py: Change logic to unistall packages mariano.lopez
2015-11-26  9:34 ` [PATCH 1/1] " mariano.lopez

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