[OE-core] [PATCH] package_deb: Fix rootfs generation in non Debian-based hosts

Aníbal Limón anibal.limon at linux.intel.com
Mon Mar 23 16:05:07 UTC 2015


Since we have support of log checking in deb/ipk [1] rootfs generation
in non Debian-based hosts fails because apt-ftparchive generates a
warn when not find /etc/apt/apt.conf.d/ (available in Debian-based
hosts).

In order to fix,

	package_manager.py: DpkgPMIndexer add support for export APT_CONF
	to environment.

[1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=86aec93902af2e2d7d73ca9a643707fcca45055c

Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
 meta/lib/oe/package_manager.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index c9a8084..395c0d01 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -169,7 +169,14 @@ class OpkgIndexer(Indexer):
 
 
 class DpkgIndexer(Indexer):
+    def __init__(self, d, deploy_dir, apt_conf_file=None):
+        self.apt_conf_file = apt_conf_file
+        Indexer.__init__(self, d, deploy_dir)
+
     def write_index(self):
+        if not self.apt_conf_file is None:
+            os.environ['APT_CONFIG'] = self.apt_conf_file
+
         pkg_archs = self.d.getVar('PACKAGE_ARCHS', True)
         if pkg_archs is not None:
             arch_list = pkg_archs.split()
@@ -1507,7 +1514,7 @@ class DpkgPM(PackageManager):
 
         self._create_configs(archs, base_archs)
 
-        self.indexer = DpkgIndexer(self.d, self.deploy_dir)
+        self.indexer = DpkgIndexer(self.d, self.deploy_dir, self.apt_conf_file)
 
     """
     This function will change a package's status in /var/lib/dpkg/status file.
-- 
1.8.4.5




More information about the Openembedded-core mailing list