Hello community, here is the log from the commit of package yum for openSUSE:Factory checked in at Fri Apr 16 02:04:37 CEST 2010. -------- --- yum/yum.changes 2010-03-31 13:50:56.000000000 +0200 +++ /mounts/work_src_done/STABLE/yum/yum.changes 2010-04-12 12:43:18.000000000 +0200 @@ -1,0 +2,10 @@ +Mon Apr 12 10:37:57 UTC 2010 - mbarringer@novell.com + +- Porting patches over from createrepo-0.4: + - EULA support (<license-to-confirm>) + - SUSE changelog support + - Adds suggests, recommends, supplements, and recommends tags + - Disables an annoying thing where yum dumps the contents + of a node to the terminal when the contents are not utf-8 + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- yum-3.2.25-disable-annoying-debug-info.patch yum-3.2.25-license-to-confirm.patch yum-3.2.25-suse-changelogs.patch yum-3.2.25-suse-missing-tags.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yum.spec ++++++ --- /var/tmp/diff_new_pack.FSljfc/_old 2010-04-16 02:04:04.000000000 +0200 +++ /var/tmp/diff_new_pack.FSljfc/_new 2010-04-16 02:04:04.000000000 +0200 @@ -21,7 +21,7 @@ Name: yum BuildRequires: dbus-1 intltool python-devel Version: 3.2.25 -Release: 1 +Release: 2 Summary: RPM installer/updater Group: System/Packages License: GPLv2+ @@ -30,6 +30,10 @@ Source1: %{name}.conf Source2: %{name}-updatesd.init Patch0: %{name}-3.2.6-epoch_workaround.patch +Patch1: yum-3.2.25-license-to-confirm.patch +Patch2: yum-3.2.25-suse-changelogs.patch +Patch3: yum-3.2.25-suse-missing-tags.patch +Patch4: yum-3.2.25-disable-annoying-debug-info.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: rpm >= 4.4.0 Requires: rpm-python @@ -94,6 +98,11 @@ %prep %setup -q %patch0 +%patch1 +%patch2 +%patch3 +%patch4 + %ifnarch %{ix86} for i in rpmUtils yum do ++++++ yum-3.2.25-disable-annoying-debug-info.patch ++++++ --- yum/misc.py.orig 2010-04-12 12:28:21.000000000 +0200 +++ yum/misc.py 2010-04-12 12:28:35.000000000 +0200 @@ -761,8 +761,8 @@ else: if x.encode(enc) == item: - if enc != 'utf-8': - print '\n%s encoding on %s\n' % (enc, item) +# if enc != 'utf-8': +# print '\n%s encoding on %s\n' % (enc, item) return x.encode('utf-8') ++++++ yum-3.2.25-license-to-confirm.patch ++++++ --- yum/packages.py.orig 2010-04-09 12:26:43.000000000 +0200 +++ yum/packages.py 2010-04-09 13:24:51.000000000 +0200 @@ -34,6 +34,8 @@ import Errors import errno import struct +import glob + from constants import * import urlparse @@ -1015,6 +1017,23 @@ def xml_dump_primary_metadata(self): msg = """\n<package type="rpm">""" msg += misc.to_unicode(self._dump_base_items()) + eulas = glob.glob("%s.eula.*" % self.localPkg()) + if eulas is not None: + for eula in eulas: + match = re.match("(.*eula).(.*)", eula) + lang = match.group(2) + + eulaContent = None + + try: + fd = open(eula, "r") + eulaContent = fd.read() + fd.close() + except IOError: + raise MDError, "Failed read contents of %s" % eula + + if eulaContent is not None: + msg += """<suse:license-to-confirm lang="%s">%s</suse:license-to-confirm>""" % (lang, unicode(eulaContent, "utf-8")) msg += misc.to_unicode(self._dump_format_items()) msg += """\n</package>""" return misc.to_utf8(msg) ++++++ yum-3.2.25-suse-changelogs.patch ++++++ --- yum/packages.py.orig 2010-04-09 12:26:43.000000000 +0200 +++ yum/packages.py 2010-04-09 13:40:53.000000000 +0200 @@ -1007,6 +1007,8 @@ else: clogs = self.changelog[:clog_limit] for (ts, author, content) in reversed(clogs): + if author[0] == '-': + author = author[2:] msg += """<changelog author="%s" date="%s">%s</changelog>\n""" % ( misc.to_xml(author, attrib=True), misc.to_xml(str(ts)), misc.to_xml(content)) ++++++ yum-3.2.25-suse-missing-tags.patch ++++++ --- yum/packages.py.orig 2010-04-09 12:26:43.000000000 +0200 +++ yum/packages.py 2010-04-12 12:24:00.000000000 +0200 @@ -897,7 +899,9 @@ msg += self._dump_pco('provides') msg += self._dump_requires() msg += self._dump_pco('conflicts') - msg += self._dump_pco('obsoletes') + msg += self._dump_pco('obsoletes') + msg += self._dump_suggests_and_recommends() + msg += self._dump_enhances_and_supplements() msg += self._dump_files(True) msg += """\n </format>""" return msg @@ -968,7 +972,111 @@ 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() ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org