def __init__(self, specfile): Section.__init__(self, specfile) self.removing_authors = False # Tracks the use of a macro. When this happens and we're still in a # description, we actually don't know where we are so we just put all # the following lines blindly, without trying to fix anything. self.unknown_line = False
def __init__(self, specfile, pkgconfig): Section.__init__(self, specfile) # do we want pkgconfig self.pkgconfig = pkgconfig # dict of license replacement options self.license_conversions = self._read_licenses_changes() # dict of pkgconfig conversions self.pkgconfig_conversions = self._read_pkgconfig_changes() # start the object self._start_paragraph() # initialize list of groups that need to pass over conversion fixer self.categories_with_package_tokens = self.categories_with_sorted_package_tokens[:] # these packages actually need fixing after we sent the values to reorder them self.categories_with_package_tokens.append('provides_obsoletes') # simple categories matching self.category_to_re = { 'name': self.reg.re_name, 'version': self.reg.re_version, # license need fix replacment 'summary': self.reg.re_summary, 'url': self.reg.re_url, 'group': self.reg.re_group, # for source, we have a special match to keep the source number # for patch, we have a special match to keep the patch number 'buildrequires': self.reg.re_buildrequires, # for prereq we append warning comment so we don't mess it there 'requires': self.reg.re_requires, 'recommends': self.reg.re_recommends, 'suggests': self.reg.re_suggests, 'enhances': self.reg.re_enhances, 'supplements': self.reg.re_supplements, # for provides/obsoletes, we have a special case because we group them # for build root, we have a special match because we force its value 'buildarch': self.reg.re_buildarch, } # deprecated definitions that we no longer want to see self.category_to_clean = { 'vendor': self.reg.re_vendor, 'autoreqprov': self.reg.re_autoreqprov, 'epoch': self.reg.re_epoch, }
def __init__(self, specfile, pkgconfig): Section.__init__(self, specfile) # do we want pkgconfig self.pkgconfig = pkgconfig # dict of license replacement options self.license_conversions = self._read_licenses_changes() # dict of pkgconfig conversions self.pkgconfig_conversions = self._read_pkgconfig_changes() # start the object self._start_paragraph() # initialize list of groups that need to pass over conversion fixer self.categories_with_package_tokens = self.categories_with_sorted_package_tokens[:] # these packages actually need fixing after we sent the values to reorder them self.categories_with_package_tokens.append('provides_obsoletes') # simple categories matching self.category_to_re = { 'name': self.reg.re_name, 'version': self.reg.re_version, # license need fix replacment 'summary': self.reg.re_summary, 'url': self.reg.re_url, 'group': self.reg.re_group, # for source, we have a special match to keep the source number # for patch, we have a special match to keep the patch number 'buildrequires': self.reg.re_buildrequires, # for prereq we append warning comment so we don't mess it there 'requires': self.reg.re_requires, 'recommends': self.reg.re_recommends, 'suggests': self.reg.re_suggests, 'ehnances': self.reg.re_enhances, 'supplements': self.reg.re_supplements, # for provides/obsoletes, we have a special case because we group them # for build root, we have a special match because we force its value 'buildarch': self.reg.re_buildarch, } # deprecated definitions that we no longer want to see self.category_to_clean = { 'vendor': self.reg.re_vendor, 'autoreqprov': self.reg.re_autoreqprov, 'epoch': self.reg.re_epoch, }