Public Member Functions | Public Attributes | List of all members
generate-manifest.Product Class Reference

Public Member Functions

def __init__ (self, product, qualifiers)
 
def manifest_entry (self)
 

Public Attributes

 product
 
 qualifiers
 

Detailed Description

Definition at line 38 of file generate-manifest.py.

Constructor & Destructor Documentation

def generate-manifest.Product.__init__ (   self,
  product,
  qualifiers 
)

Definition at line 39 of file generate-manifest.py.

39  def __init__(self,product,qualifiers):
40  self.product=product
41  self.qualifiers=qualifiers
42 
def __init__(self, product, qualifiers)

Member Function Documentation

def generate-manifest.Product.manifest_entry (   self)

Definition at line 43 of file generate-manifest.py.

43  def manifest_entry(self):
44  name=self.product[0]
45  version=self.product[1]
46  optional=self.product[2]
47 
48  qualifiers=self.qualifiers.split(':')
49  rqual=list(filter(re.compile(r'(e[0-9]{2}|c[0-9]{1})').search , qualifiers))
50  bqual=list(filter(re.compile(r'(debug|prof)').search , qualifiers))
51  aqual=list(filter(re.compile(r'(noarch|slf7-x86_64)').search , qualifiers))
52 
53  arch='slf7-x86_64' if not aqual else aqual[0]
54 
55  if name in sl7_only_packages and arch.startswith('slf'):
56  arch=arch.replace('slf','sl')
57 
58  tarball='{0:s}-{1:s}-{2:s}'.format(name,version.replace('_', '.').replace('v','') ,arch)
59 
60  if rqual:
61  tarball += '-{0:s}'.format(rqual[0])
62  if bqual:
63  tarball += '-{0:s}'.format(bqual[0])
64 
65  tarball +='.tar.bz2'
66  entry = '{0:20s} {1:10s} {2:70s}'.format(name,version,tarball)
67  entry += ' -f {0:20s}'.format('Linux64bit+3.10-2.17' if arch == 'slf7-x86_64' else 'NULL')
68 
69  if self.qualifiers !='-nq-' and self.qualifiers != '-' and self.qualifiers != 'noarch':
70  entry += ' -q {0:20s}'.format(self.qualifiers)
71 
72  entry += '\n'
73 
74  return entry
75 
76 
77 
static bool format(QChar::Decomposition tag, QString &str, int index, int len)
Definition: qstring.cpp:11496

Member Data Documentation

generate-manifest.Product.product

Definition at line 40 of file generate-manifest.py.

generate-manifest.Product.qualifiers

Definition at line 41 of file generate-manifest.py.


The documentation for this class was generated from the following file: