summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-01-27 15:14:26 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-31 13:29:37 +0000
commit25477874ef737777cedc623a8e1c5aedf2f4bae1 (patch)
treece4ca02302269b649474c7710fe8816f4e5103f2
parentf44f12af346888bdeb3ae01a275cb5dd4396b505 (diff)
downloadopenembedded-core-contrib-25477874ef737777cedc623a8e1c5aedf2f4bae1.tar.gz
openembedded-core-contrib-25477874ef737777cedc623a8e1c5aedf2f4bae1.tar.bz2
openembedded-core-contrib-25477874ef737777cedc623a8e1c5aedf2f4bae1.zip
lib/oe/package_manager: remove package feed lists
Remove opkg package feed lists after generating the rootfs. The lists have been generated by the local feed but are no longer necessary after image generation. This still leaves the package management fully usable (and hence is different from omitting package-management from IMAGE_FEATURES). Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/package_manager.py11
-rw-r--r--meta/lib/oe/rootfs.py2
2 files changed, 9 insertions, 4 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 3f9e4e3b60..5776952523 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1432,10 +1432,11 @@ class OpkgPM(PackageManager):
if not os.path.exists(self.d.expand('${T}/saved')):
bb.utils.mkdirhier(self.d.expand('${T}/saved'))
- if (self.d.getVar('BUILD_IMAGES_FROM_FEEDS', True) or "") != "1":
- self._create_config()
- else:
+ self.from_feeds = (self.d.getVar('BUILD_IMAGES_FROM_FEEDS', True) or "") == "1"
+ if self.from_feeds:
self._create_custom_config()
+ else:
+ self._create_config()
self.indexer = OpkgIndexer(self.d, self.deploy_dir)
@@ -1638,6 +1639,10 @@ class OpkgPM(PackageManager):
# create the directory back, it's needed by PM lock
bb.utils.mkdirhier(self.opkg_dir)
+ def remove_lists(self):
+ if not self.from_feeds:
+ bb.utils.remove(os.path.join(self.opkg_dir, "lists"), True)
+
def list_installed(self):
return OpkgPkgsList(self.d, self.target_rootfs, self.config_file).list_pkgs()
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 0e901c2405..0f835d311b 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -949,7 +949,7 @@ class OpkgRootfs(DpkgOpkgRootfs):
self._log_check_error()
def _cleanup(self):
- pass
+ self.pm.remove_lists()
def get_class_for_type(imgtype):
return {"rpm": RpmRootfs,