actionsapi/texlivemodules: Add exception for None values of "patterns"
Every format file has some keywords that are passed to the appropriate application during the build stage. However some of thes keywords, such as "patterns" may have Null values (do not exist) or have empty string. Thus, we add here an exception for Null values of "patterns". If no "patterns" keyword exist, than we create a new one with the parameter '-' This parameter is default and is adviced from the TexLive developers itself.
This commit is contained in:
@@ -84,7 +84,6 @@ def install(parameters = ''):
|
|||||||
if handleConfigFiles():
|
if handleConfigFiles():
|
||||||
raise Installing, _('Handle config files failed')
|
raise Installing, _('Handle config files failed')
|
||||||
|
|
||||||
|
|
||||||
def createSymlinksFormat2Engines():
|
def createSymlinksFormat2Engines():
|
||||||
'''Create symlinks from format to engines'''
|
'''Create symlinks from format to engines'''
|
||||||
for formatfile in ls("%s/texmf/fmtutil/format*.cnf" % get.curDIR()):
|
for formatfile in ls("%s/texmf/fmtutil/format*.cnf" % get.curDIR()):
|
||||||
@@ -157,7 +156,6 @@ def handleConfigFiles():
|
|||||||
domove("/usr/share/texmf/%s/%s" % (dirname,configFile), "/etc/texmf/%s.d" % dirname)
|
domove("/usr/share/texmf/%s/%s" % (dirname,configFile), "/etc/texmf/%s.d" % dirname)
|
||||||
dosym("/etc/texmf/%s.d/%s" % (dirname, configFile), "/usr/share/texmf/%s/%s" %(dirname, configFile))
|
dosym("/etc/texmf/%s.d/%s" % (dirname, configFile), "/usr/share/texmf/%s/%s" %(dirname, configFile))
|
||||||
|
|
||||||
|
|
||||||
def addFormat(parameters):
|
def addFormat(parameters):
|
||||||
'''Add format files'''
|
'''Add format files'''
|
||||||
if not os.path.isdir("%s/texmf/fmtutil/" % get.curDIR()):
|
if not os.path.isdir("%s/texmf/fmtutil/" % get.curDIR()):
|
||||||
@@ -178,12 +176,13 @@ def addFormat(parameters):
|
|||||||
para_dict[pair[0]] = pair[1]
|
para_dict[pair[0]] = pair[1]
|
||||||
if pair[0] == "patterns" and pair[1] == '':
|
if pair[0] == "patterns" and pair[1] == '':
|
||||||
para_dict["patterns"] = '-' # Specified in the texlive-module.eclass
|
para_dict["patterns"] = '-' # Specified in the texlive-module.eclass
|
||||||
|
elif not pair[0] == 'patterns':
|
||||||
|
para_dict["patterns"] = '-'
|
||||||
|
|
||||||
cnf_file = open('%s/texmf/fmtutil/format.%s.cnf' % (get.curDIR(),get.srcNAME()), 'a')
|
cnf_file = open('%s/texmf/fmtutil/format.%s.cnf' % (get.curDIR(),get.srcNAME()), 'a')
|
||||||
cnf_file.write("%s\t%s\t%s\t%s\n" % (para_dict["name"], para_dict["engine"], para_dict["patterns"], para_dict["options"]))
|
cnf_file.write("%s\t%s\t%s\t%s\n" % (para_dict["name"], para_dict["engine"], para_dict["patterns"], para_dict["options"]))
|
||||||
cnf_file.close()
|
cnf_file.close()
|
||||||
|
|
||||||
|
|
||||||
def moveSources():
|
def moveSources():
|
||||||
reloc = "texmf-dist"
|
reloc = "texmf-dist"
|
||||||
|
|
||||||
@@ -199,7 +198,6 @@ def moveSources():
|
|||||||
os.system("mkdir -p %s/%s" % (reloc,dirname))
|
os.system("mkdir -p %s/%s" % (reloc,dirname))
|
||||||
shutil.move("%s" % path , "%s/%s" % (reloc,dirname))
|
shutil.move("%s" % path , "%s/%s" % (reloc,dirname))
|
||||||
|
|
||||||
|
|
||||||
def buildFormatFiles():
|
def buildFormatFiles():
|
||||||
'''Build format files'''
|
'''Build format files'''
|
||||||
if os.path.isdir("%s/texmf/fmtutil/" % get.curDIR()):
|
if os.path.isdir("%s/texmf/fmtutil/" % get.curDIR()):
|
||||||
@@ -228,7 +226,6 @@ def addLanguageDat(parameter):
|
|||||||
language_dat.write("=%s\n" % para_dict["synonyms"])
|
language_dat.write("=%s\n" % para_dict["synonyms"])
|
||||||
language_dat.close()
|
language_dat.close()
|
||||||
|
|
||||||
|
|
||||||
def addLanguageDef(parameter):
|
def addLanguageDef(parameter):
|
||||||
'''Create language.*.def files'''
|
'''Create language.*.def files'''
|
||||||
parameter = parameter.split()
|
parameter = parameter.split()
|
||||||
@@ -252,8 +249,6 @@ def addLanguageDef(parameter):
|
|||||||
language_def.write("\\addlanguage{%s}{%s}{}{%s}{%s}\n" % (para_dict["synonyms"], para_dict["file"], para_dict["lefthyphenmin"], para_dict["righthyphenmin"]))
|
language_def.write("\\addlanguage{%s}{%s}{}{%s}{%s}\n" % (para_dict["synonyms"], para_dict["file"], para_dict["lefthyphenmin"], para_dict["righthyphenmin"]))
|
||||||
language_def.close()
|
language_def.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def generateConfigFiles():
|
def generateConfigFiles():
|
||||||
'''Generate config files'''
|
'''Generate config files'''
|
||||||
for tlpobjfile in ls("%s/tlpkg/tlpobj/*" % get.curDIR()):
|
for tlpobjfile in ls("%s/tlpkg/tlpobj/*" % get.curDIR()):
|
||||||
|
|||||||
Reference in New Issue
Block a user