From 77e2e51f950bcfb0d87bcb45947e7df919e7203b Mon Sep 17 00:00:00 2001 From: Fatih Arslan Date: Wed, 13 Oct 2010 08:04:17 +0000 Subject: [PATCH] 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. --- pisi/actionsapi/texlivemodules.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pisi/actionsapi/texlivemodules.py b/pisi/actionsapi/texlivemodules.py index 48f2b525..a081c504 100644 --- a/pisi/actionsapi/texlivemodules.py +++ b/pisi/actionsapi/texlivemodules.py @@ -84,7 +84,6 @@ def install(parameters = ''): if handleConfigFiles(): raise Installing, _('Handle config files failed') - def createSymlinksFormat2Engines(): '''Create symlinks from format to engines''' 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) dosym("/etc/texmf/%s.d/%s" % (dirname, configFile), "/usr/share/texmf/%s/%s" %(dirname, configFile)) - def addFormat(parameters): '''Add format files''' if not os.path.isdir("%s/texmf/fmtutil/" % get.curDIR()): @@ -178,12 +176,13 @@ def addFormat(parameters): para_dict[pair[0]] = pair[1] if pair[0] == "patterns" and pair[1] == '': 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.write("%s\t%s\t%s\t%s\n" % (para_dict["name"], para_dict["engine"], para_dict["patterns"], para_dict["options"])) cnf_file.close() - def moveSources(): reloc = "texmf-dist" @@ -199,7 +198,6 @@ def moveSources(): os.system("mkdir -p %s/%s" % (reloc,dirname)) shutil.move("%s" % path , "%s/%s" % (reloc,dirname)) - def buildFormatFiles(): '''Build format files''' 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.close() - def addLanguageDef(parameter): '''Create language.*.def files''' 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.close() - - def generateConfigFiles(): '''Generate config files''' for tlpobjfile in ls("%s/tlpkg/tlpobj/*" % get.curDIR()):