1d3b0a8708
OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive-filesystem?expand=0&rev=73
29 lines
817 B
Python
29 lines
817 B
Python
#!/usr/bin/python
|
|
#
|
|
# $TEXMFDIST/texconfig/zypper.py
|
|
#
|
|
# The substitute for the %posttrans scriptlets used by rpm.
|
|
# Make sure that the update script does its work only once after
|
|
# an installation/update transaction as zypper executes rpm for
|
|
# each single texlive package.
|
|
#
|
|
# 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 path, remove, access, F_OK,R_OK,X_OK
|
|
from subprocess import call
|
|
|
|
global update, tagfile
|
|
update = "%{_texmfdistdir}/texconfig/update"
|
|
tagfile = "/var/run/texlive/run-update"
|
|
|
|
if access(update, F_OK|X_OK) and path.exists(tagfile):
|
|
call("VERBOSE=false " + update + " 2>&1 || :", shell=True)
|
|
try:
|
|
remove(tagfile)
|
|
except OSError:
|
|
pass
|