Package gbp :: Package rpm :: Class SpecFile
[hide private]
[frames] | no frames]

Class SpecFile

object --+
         |
        SpecFile

Class for parsing/modifying spec files

Instance Methods [hide private]
 
__init__(self, specfile)
x.__init__(...) initializes x; see help(type(x)) for signature
 
putautoupdatemarkers(self)
Update spec by putting autoupdate markers Returns the number of lines added
 
updatepatches(self, patchfilenames)
Update spec file with a new set of patches
 
patchseries(self)
Return patches of the RPM as a gbp patchseries
 
guess_orig_file(self)
Try to guess the name of the primary upstream/source tarball returns a tuple with tarball filename and compression suffix
 
debugprint(self)
Print info about the spec in readable way

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  source_re = re.compile(r'(?i)^Source(?P<srcnum>[0-9]+)?:\s*(?P...
  patchfile_re = re.compile(r'(?i)^Patch(?P<patchnum>[0-9]+)?:\s...
  applypatch_re = re.compile(r'^%patch(?P<patchnum>[0-9]+)?(\s+(...
  marker_re = re.compile(r'^#\s+(?P<marker>>>|<<)\s+(?P<what>gbp...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, specfile)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

Class Variable Details [hide private]

source_re

Value:
re.compile(r'(?i)^Source(?P<srcnum>[0-9]+)?:\s*(?P<filename>[^\s].*[^\\
s])\s*$')

patchfile_re

Value:
re.compile(r'(?i)^Patch(?P<patchnum>[0-9]+)?:\s*(?P<filename>.+)\s*$')

applypatch_re

Value:
re.compile(r'^%patch(?P<patchnum>[0-9]+)?(\s+(?P<args>.*))?$')

marker_re

Value:
re.compile(r'^#\s+(?P<marker>>>|<<)\s+(?P<what>gbp-[^\s]+)\s*(?P<comme\
nt>.*)$')