[Yum-devel] [PATCH] Include environments when writing comps (rhbz#852240)
Jesse Keating
jkeating at redhat.com
Tue Aug 28 19:35:26 UTC 2012
Environments are new, and we need to include those when writing out a
merged comps. This just wires up the existing infrastructure that came
from previous patches.
---
yum/comps.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/yum/comps.py b/yum/comps.py
index cf671b6..08e66b9 100755
--- a/yum/comps.py
+++ b/yum/comps.py
@@ -790,7 +790,8 @@ class Comps(object):
def xml(self):
"""returns the xml of the comps files in this class, merged"""
- if not self._groups and not self._categories:
+ if not self._groups and not self._categories and \
+ not self._environments:
return ""
msg = """<?xml version="1.0" encoding="UTF-8"?>
@@ -802,6 +803,8 @@ class Comps(object):
msg += g.xml()
for c in self.get_categories():
msg += c.xml()
+ for e in self.get_environments():
+ msg += e.xml()
msg += """\n</comps>\n"""
--
1.7.11.2
More information about the Yum-devel
mailing list