[PATCH 2/4] package_manager.py: user 'purge' instead of 'remove' in case of deb

Chen Qi
2014-12-19T06:21:39Z

We need to use 'purge' instead of 'remove' for debian package backend when
removing packages at rootfs time. This is because that 'remove' command for
'dpkg' and 'apt-get' does not remove configuration files.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/lib/oe/package_manager.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 69100f1..c8aa61c 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1628,10 +1628,10 @@ class DpkgPM(PackageManager):
def remove(self, pkgs, with_dependencies=True):
if with_dependencies:
os.environ['APT_CONFIG'] = self.apt_conf_file
- cmd = "%s remove %s" % (self.apt_get_cmd, ' '.join(pkgs))
+ cmd = "%s purge %s" % (self.apt_get_cmd, ' '.join(pkgs))
else:
cmd = "%s --admindir=%s/var/lib/dpkg --instdir=%s" \
- " -r --force-depends %s" % \
+ " -P --force-depends %s" % \
(bb.utils.which(os.getenv('PATH'), "dpkg"),
self.target_rootfs, self.target_rootfs, ' '.join(pkgs))

--
1.9.1