--- yum/packages.py.orig	2010-12-11 05:16:00.000000000 +0000
+++ yum/packages.py	2013-06-20 10:42:25.000000000 +0000
@@ -1075,6 +1075,8 @@
         msg += self._dump_requires()
         msg += self._dump_pco('conflicts')         
         msg += self._dump_pco('obsoletes')         
+        msg += self._dump_suggests_and_recommends()
+        msg += self._dump_enhances_and_supplements()
         msg += self._dump_files(True)
         if msg[-1] != '\n':
             msg += """\n"""
@@ -1128,6 +1130,110 @@
     def _requires_with_pre(self):
         raise NotImplementedError()
                     
+    # Rather than trying to stuff enhances, suggests, supplements and recommends
+    # into yum like the other tags, I'll save my sanity and just do it by hand. 
+    def _dump_suggests_and_recommends(self):
+        msg = ""
+        suggests = ""
+        recommends = ""
+        names = self.hdr[rpm.RPMTAG_SUGGESTSNAME]
+        if not names:
+            return msg
+
+        if type(names).__name__ != 'list':
+            names = [names]
+
+        flags = self.hdr[rpm.RPMTAG_SUGGESTSFLAGS]
+        if type(flags).__name__ != 'list':
+            flags = [flags]
+        
+        versions = self.hdr[rpm.RPMTAG_SUGGESTSVERSION]
+        if type(versions).__name__ != 'list':
+             versions = [versions]
+
+        for i in range(len(names)):
+            name = names[i]
+            if name.startswith('rpmlib('):
+                continue
+            flag = flags[i]
+            flagstr = flagToString(flag)
+            (e,v,r) = stringToVersion(versions[i])
+            entry = '''      <rpm:entry name="%s"''' % misc.to_xml(name, attrib=True)
+            if flagstr:
+                entry += ''' flags="%s"''' % misc.to_xml(flagstr, attrib=True)
+                if e:
+                    entry += ''' epoch="%s"''' % misc.to_xml(e, attrib=True)
+                if v:
+                    entry += ''' ver="%s"''' % misc.to_xml(v, attrib=True)
+                if r:
+                    entry += ''' rel="%s"''' % misc.to_xml(r, attrib=True)
+            entry += "/>\n"
+            if flag & rpm.RPMSENSE_STRONG:
+                recommends += entry
+            else:
+                suggests += entry
+        if suggests:
+            msg += "\n    <rpm:suggests>\n"
+            msg += suggests
+            msg += "    </rpm:suggests>\n"
+        if recommends:
+            msg += "\n    <rpm:recommends>\n"
+            msg += recommends
+            msg += "    </rpm:recommends>\n"
+ 
+        return msg
+
+    def _dump_enhances_and_supplements(self):
+        msg = ""
+        enhances = ""
+        supplements = ""
+        names = self.hdr[rpm.RPMTAG_ENHANCESNAME]
+        if not names:
+            return msg
+        if type(names).__name__ != 'list':
+            names = [names]
+
+        flags = self.hdr[rpm.RPMTAG_ENHANCESFLAGS]
+        if type(flags).__name__ != 'list':
+            flags = [flags]
+
+        versions = self.hdr[rpm.RPMTAG_ENHANCESVERSION]
+        if type(versions).__name__ != 'list':
+             versions = [versions]
+
+        for i in range(len(names)):
+            name = names[i]
+            if name.startswith('rpmlib('):
+                continue
+            flag = flags[i]
+            flagstr = flagToString(flag)
+            (e,v,r) = stringToVersion(versions[i])
+            entry = '''      <rpm:entry name="%s"''' % misc.to_xml(name, attrib=True)
+            if flagstr:
+                entry += ''' flags="%s"''' % misc.to_xml(flagstr, attrib=True)
+                if e:
+                    entry += ''' epoch="%s"''' % misc.to_xml(e, attrib=True)
+                if v:
+                    entry += ''' ver="%s"''' % misc.to_xml(v, attrib=True)
+                if r:
+                    entry += ''' rel="%s"''' % misc.to_xml(r, attrib=True)
+            entry += "/>\n"
+            if flag & rpm.RPMSENSE_STRONG:
+                supplements += entry
+            else:
+                enhances += entry
+        if supplements:
+            msg += "\n    <rpm:supplements>\n"
+            msg += supplements
+            msg += "    </rpm:supplements>\n"
+        if enhances:
+            msg += "\n    <rpm:enhances>\n"
+            msg += enhances
+            msg += "    </rpm:enhances>\n"
+
+        return msg
+
+
     def _dump_requires(self):
         """returns deps in format"""
         mylist = self._requires_with_pre()
