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.
This commit is contained in:
Will Woods 2012-01-05 16:15:54 -05:00
parent b41ab87427
commit 5e411b09c0
1 changed files with 1 additions and 1 deletions

View File

@ -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)))