Пример #1
0
 def __init__(self, suite, traits_table, packages_table):
     tablename = ujoin(suite, 'templates')
     packs_column = PkBigname('package')
     packs_column.set_fk(packages_table)
     tcolumns = template_columns()
     tcolumns[-1].set_fk('textfiles')
     columns = tcolumns[:1] + [packs_column] + tcolumns[1:]
     _TraitRelation.__init__(self, traits_table, tablename, columns)
Пример #2
0
 def __init__(self, suite, traits_table, packages_table):
     packs_column = PkBigname('package')
     packs_column.set_fk(packages_table)
     action_column = PkName('action')
     action_column.constraint.default = 'install'
     columns = [packs_column, action_column]
     tablename = ujoin(suite, 'trait', 'package')
     _TraitRelation.__init__(self, traits_table, tablename, columns)
Пример #3
0
 def __init__(self, suite, traits_table, packages_table):
     packs_column = PkBigname('package')
     packs_column.set_fk(packages_table)
     action_column = PkName('action')
     action_column.constraint.default = 'install'
     columns = [packs_column, action_column]
     tablename = ujoin(suite, 'trait', 'package')
     _TraitRelation.__init__(self, traits_table, tablename, columns)
Пример #4
0
 def __init__(self, suite, traits_table, packages_table):
     tablename = ujoin(suite, 'templates')
     packs_column = PkBigname('package')
     packs_column.set_fk(packages_table)
     tcolumns = template_columns()
     tcolumns[-1].set_fk('textfiles')
     columns = tcolumns[:1] + [packs_column] + tcolumns[1:]
     _TraitRelation.__init__(self, traits_table, tablename, columns)
Пример #5
0
 def __init__(self, suite, traits_table, packages_table):
     packs_column = PkBigname('package')
     if not os.environ.has_key('PAELLA_DB_NOPACKAGETABLES'):
         packs_column.set_fk(packages_table)
     action_column = PkName('action')
     action_column.constraint.default = 'install'
     columns = [packs_column, action_column]
     tablename = ujoin(suite, 'trait', 'package')
     _TraitRelation.__init__(self, traits_table, tablename, columns)
Пример #6
0
 def __init__(self, suite, traits_table, packages_table):
     packs_column = PkBigname('package')
     if not os.environ.has_key('PAELLA_DB_NOPACKAGETABLES'):
         packs_column.set_fk(packages_table)
     action_column = PkName('action')
     action_column.constraint.default = 'install'
     columns = [packs_column, action_column]
     tablename = ujoin(suite, 'trait', 'package')
     _TraitRelation.__init__(self, traits_table, tablename, columns)
Пример #7
0
def family_env_columns():
    return [
        PkName('family'),
        PkName('trait'),
        PkBigname('name'),
        Text('value')
    ]
Пример #8
0
def template_columns():
    return [
        PkBigname('template'),
        Name('mode'),
        Name('owner'),
        Name('grp_owner'),
        Num('templatefile')]
Пример #9
0
 def __init__(self, profiles_table):
     profile_col = PkName('profile')
     profile_col.set_fk(profiles_table)
     trait_col = PkName('trait')
     name_col = PkBigname('name')
     value_col = Text('value')
     cols = [profile_col, trait_col, name_col, value_col]
     tablename = ujoin('profile', 'variables')
     Table.__init__(self, tablename, cols)
Пример #10
0
 def __init__(self, mach_types_table):
     mtype_col = PkName('machine_type')
     mtype_col.set_fk(mach_types_table)
     trait_col = PkName('trait')
     name_col = PkBigname('name')
     value_col = Text('value')
     cols = [mtype_col, trait_col, name_col, value_col]
     tablename = ujoin('machine_type', 'variables')
     Table.__init__(self, tablename, cols)
Пример #11
0
def debconf_columns():
    return [
        PkBigname('name'),
        Bigname('value'),
        Bigname('owners'),
        Bigname('flags'),
        Bigname('template'),
        Text('variables')
    ]
Пример #12
0
def packages_columns():
    return [
        PkBigname('package'),
        Name('priority'),
        Bigname('section'),
        Num('installedsize'),
        Bigname('filename'),
        Bigname('maintainer'),
        Bigname('size'),
        Name('md5sum'),
        Bigname('version'),
        Text('description')]
Пример #13
0
def defaultenv_columns():
    return [PkName('section'), PkBigname('option'), Text('value')]
Пример #14
0
def currentenv_columns():
    return [PkName('hostname'), PkBigname('name'), Text('value')]
Пример #15
0
 def __init__(self, suite, traits_table):
     cols = [PkBigname('name'), Text('value')]
     tablename = ujoin(suite, 'variables')
     _TraitRelation.__init__(self, traits_table, tablename, cols)
Пример #16
0
from useless.sqlgen.classes import Column, Table
from useless.sqlgen.defaults import Text
from useless.sqlgen.defaults import PkBigname, Bigname, Name, Num

dpkg_tables = ['available', 'status', 'filelist', 'md5sums', 'conffiles']
other_tables = ['current']


common_columns = [
    PkBigname('package'),
    Name('essential'),
    Name('priority'),
    Name('section'),
    Num('installedsize'),
    Bigname('maintainer'),
    Name('version')
    ]
    

#columns for /var/lib/dpkg/status
status_columns = common_columns + [
    Name('status'),
    Text('replaces'),
    Text('provides'),
    Text('predepends'),
    Text('conflicts'),
    Bigname('source'),
    Text('suggests'),
    Text('recommends'),
    Text('depends'),