def register_pkg(name, formula_def, conn=None):
 if (conn is None):
  conn = init()
 conn.execute('INSERT INTO packages VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', (name, formula_def['version'], formula_def['release'], datetime.datetime.utcnow().strftime('%a, %d %b %Y %H:%M:%S GMT'), formula_def.get('os', None), formula_def.get('os_family', None), formula_def.get('dependencies', None), formula_def.get('os_dependencies', None), formula_def.get('os_family_dependencies', None), formula_def['summary'], formula_def['description']))

def register_pkg ( name , formula_def , conn = None ) : if ( conn is None ) : conn = init ( ) conn . execute ( 'INSERT INTO packages VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' , ( name , formula_def [ 'version' ] , formula_def [ 'release' ] , datetime . datetime . utcnow ( ) . strftime ( '%a, %d %b %Y %H:%M:%S GMT' ) , formula_def . get ( 'os' , None ) , formula_def . get ( 'os_family' , None ) , formula_def . get ( 'dependencies' , None ) , formula_def . get ( 'os_dependencies' , None ) , formula_def . get ( 'os_family_dependencies' , None ) , formula_def [ 'summary' ] , formula_def [ 'description' ] ) )
register a package in the package database .