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:48 +0000
commitdb81fc967ae046bbb00f2347377fb521c06bf22b (patch)
tree29440ed6ab139018bc0ba6ad1d377feeba6004c7
parentc43da123335be598931a2977570b4106846b33f5 (diff)
downloadpoky-db81fc967ae046bbb00f2347377fb521c06bf22b.tar.gz
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). (From OE-Core rev: 25477874ef737777cedc623a8e1c5aedf2f4bae1) 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):
1432 if not os.path.exists(self.d.expand('${T}/saved')): 1432 if not os.path.exists(self.d.expand('${T}/saved')):
1433 bb.utils.mkdirhier(self.d.expand('${T}/saved')) 1433 bb.utils.mkdirhier(self.d.expand('${T}/saved'))
1434 1434
1435 if (self.d.getVar('BUILD_IMAGES_FROM_FEEDS', True) or "") != "1": 1435 self.from_feeds = (self.d.getVar('BUILD_IMAGES_FROM_FEEDS', True) or "") == "1"
1436 self._create_config() 1436 if self.from_feeds:
1437 else:
1438 self._create_custom_config() 1437 self._create_custom_config()
1438 else:
1439 self._create_config()
1439 1440
1440 self.indexer = OpkgIndexer(self.d, self.deploy_dir) 1441 self.indexer = OpkgIndexer(self.d, self.deploy_dir)
1441 1442
@@ -1638,6 +1639,10 @@ class OpkgPM(PackageManager):
1638 # create the directory back, it's needed by PM lock 1639 # create the directory back, it's needed by PM lock
1639 bb.utils.mkdirhier(self.opkg_dir) 1640 bb.utils.mkdirhier(self.opkg_dir)
1640 1641
1642 def remove_lists(self):
1643 if not self.from_feeds:
1644 bb.utils.remove(os.path.join(self.opkg_dir, "lists"), True)
1645
1641 def list_installed(self): 1646 def list_installed(self):
1642 return OpkgPkgsList(self.d, self.target_rootfs, self.config_file).list_pkgs() 1647 return OpkgPkgsList(self.d, self.target_rootfs, self.config_file).list_pkgs()
1643 1648
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):
949 self._log_check_error() 949 self._log_check_error()
950 950
951 def _cleanup(self): 951 def _cleanup(self):
952 pass 952 self.pm.remove_lists()
953 953
954def get_class_for_type(imgtype): 954def get_class_for_type(imgtype):
955 return {"rpm": RpmRootfs, 955 return {"rpm": RpmRootfs,