From 402ca73b5180ecbf97b095dc342343aece34ad8ceac28165b246d3fa816baeb8 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 2 Jun 2014 14:53:57 +0000 Subject: [PATCH] - Make sure texconfig/update is run only once per transaction An empty run of texconfig/update takes at least four seconds even on a fast system OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive-filesystem?expand=0&rev=44 --- texlive-filesystem.changes | 5 +++++ zypplugin.in | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/texlive-filesystem.changes b/texlive-filesystem.changes index 65ffca5..726702e 100644 --- a/texlive-filesystem.changes +++ b/texlive-filesystem.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 20 09:23:47 UTC 2014 - schwab@suse.de + +- Make sure that texconfig/update is run only once per transaction + ------------------------------------------------------------------- Mon Feb 10 10:03:46 UTC 2014 - werner@suse.de diff --git a/zypplugin.in b/zypplugin.in index 5953708..886bb42 100644 --- a/zypplugin.in +++ b/zypplugin.in @@ -7,19 +7,19 @@ # an installation/update transaction as zypper executes rpm for # each single texlive package. # -# Copyright (c) 2012 SuSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # Author: Werner Fink, 2012 # -from os import listdir, path, access, F_OK,R_OK,X_OK +from os import path, remove, access, F_OK,R_OK,X_OK from subprocess import call -global update, tagdir +global update, tagfile update = "%{_texmfdistdir}/texconfig/update" -tagdir = "/var/run/texlive" +tagfile = "/var/run/texlive/run-update" -if access(update, F_OK|X_OK): - if path.isdir(tagdir) and listdir(tagdir): - call("VERBOSE=false " + update + " 2>&1 || :", shell=True) +if access(update, F_OK|X_OK) and path.exists(tagfile): + call("VERBOSE=false " + update + " 2>&1 || :", shell=True) + remove(tagfile)