From 5e411b09c02470e485e2f5528fffdeeacfd18760 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Thu, 5 Jan 2012 16:15:54 -0500 Subject: [PATCH] consider %ghost files part of the filelists in templates When considering a package's filelist (e.g. for things like removefrom --allbut), we might need to also include the %ghost files, so make _filelist() add them to its returned list. --- src/pylorax/ltmpl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pylorax/ltmpl.py b/src/pylorax/ltmpl.py index 56ca16f0..079c7ca2 100644 --- a/src/pylorax/ltmpl.py +++ b/src/pylorax/ltmpl.py @@ -120,7 +120,7 @@ class LoraxTemplateRunner(object): def _filelist(self, *pkgs): pkglist = self.yum.doPackageLists(pkgnarrow="installed", patterns=pkgs) - return set([f for pkg in pkglist.installed for f in pkg.filelist]) + return set([f for pkg in pkglist.installed for f in pkg.filelist+pkg.ghostlist]) def _getsize(self, *files): return sum(os.path.getsize(self._out(f)) for f in files if os.path.isfile(self._out(f)))