Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2:Ports
yum
yum-3.4.3-license-to-confirm.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File yum-3.4.3-license-to-confirm.patch of Package yum
diff -ru a/yum/packages.py b/yum/packages.py --- a/yum/packages.py 2011-06-28 22:27:22.000000000 +0200 +++ b/yum/packages.py 2012-02-23 09:37:06.661458025 +0100 @@ -35,6 +35,7 @@ import Errors import errno import struct +import glob from constants import * from operator import itemgetter @@ -1252,6 +1253,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)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor