2013-02-05 11:34:25 +01:00
|
|
|
#!/usr/bin/python
|
|
|
|
#
|
2013-07-31 15:20:49 +02:00
|
|
|
# $TEXMFDIST/texconfig/zypper.py
|
2013-02-05 11:34:25 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
2014-06-02 16:53:57 +02:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2013-02-05 11:34:25 +01:00
|
|
|
#
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
# Author: Werner Fink, 2012
|
|
|
|
#
|
2014-06-02 16:53:57 +02:00
|
|
|
from os import path, remove, access, F_OK,R_OK,X_OK
|
2013-02-05 11:34:25 +01:00
|
|
|
from subprocess import call
|
|
|
|
|
2014-06-02 16:53:57 +02:00
|
|
|
global update, tagfile
|
2013-07-31 15:20:49 +02:00
|
|
|
update = "%{_texmfdistdir}/texconfig/update"
|
2014-06-02 16:53:57 +02:00
|
|
|
tagfile = "/var/run/texlive/run-update"
|
2013-02-05 11:34:25 +01:00
|
|
|
|
2014-06-02 16:53:57 +02:00
|
|
|
if access(update, F_OK|X_OK) and path.exists(tagfile):
|
|
|
|
call("VERBOSE=false " + update + " 2>&1 || :", shell=True)
|
2017-07-24 09:59:22 +02:00
|
|
|
try:
|
|
|
|
remove(tagfile)
|
|
|
|
except OSError:
|
|
|
|
pass
|